Al-Qasim bin Abd al-Rahman narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that when he came to the land of Abyssinia, he was seized over something and detained, so he gave two dinars, after which he was let go.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20482
Wahb bin Munabbih (may Allah have mercy on him) said: The bribe in which the giver is sinful is not that he gives it to protect his wealth and his life; he is not sinful in that. The bribe in which a person is sinful is the one given to take what is someone else's right.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20483