Narrated Muhammad bin 'Amr Al-Aslami that his father Hamza said
'Umar (ra) sent him (i.e. Hamza) as a Sadaqa / Zakat collector. A man had committed illegal sexual intercourse with the slave girl of his wife. Hamza took (personal) sureties for the adulterer till they came to 'Umar. 'Umar had lashed the adulterer one hundred lashes. 'Umar confirmed their claim (that the adulterer had already been punished) and excused him because of being Ignorant. Jarir Al-Ash'ath said to Ibn Mas'ud regarding renegades (i.e., those who became infidels after embracing Islam), "Let them repent and take (personal) sureties for them." They repented and their relatives stood sureties for them. According to Hammad, if somebody stands surety for another person and that person dies, the person giving surety will be released from responsibility. According to Al-Hakam, his responsibilities continues.
Narrated Abu Huraira
The Prophet (ﷺ) said, "An Israeli man asked another Israeli to lend him one thousand Dinars. The second man required witnesses. The former replied, 'Allah is sufficient as a witness.' The second said, 'I want a surety.' The former replied, 'Allah is sufficient as a surety.' The second said, 'You are right,' and lent him the money for a certain period. The debtor went across the sea. When he finished his job, he searched for a conveyance so that he might reach in time for the repayment of the debt, but he could not find any. So, he took a piece of wood and made a hole in it, inserted in it one thousand Dinars and a letter to the lender and then closed (i.e. sealed) the hole tightly. He took the piece of wood to the sea and said. 'O Allah! You know well that I took a loan of one thousand Dinars from so-and-so. He demanded a surety from me but I told him that Allah's Guarantee was sufficient and he accepted Your guarantee. He then asked for a witness and I told him that Allah was sufficient as a Witness, and he accepted You as a Witness. No doubt, I tried hard to find a conveyance so that I could pay his money but could not find, so I hand over this money to You.' Saying that, he threw the piece of wood into the sea till it went out far into it, and then he went away. Meanwhile he started searching for a conveyance in order to reach the creditor's country. One day the lender came out of his house to see whether a ship had arrived bringing his money, and all of a sudden he saw the piece of wood in which his money had been deposited. He took it home to use for fire. When he sawed it, he found his money and the letter inside it. Shortly after that, the debtor came bringing one thousand Dinars to him and said, 'By Allah, I had been trying hard to get a boat so that I could bring you your money, but failed to get one before the one I have come by.' The lender asked, 'Have you sent something to me?' The debtor replied, 'I have told you I could not get a boat other than the one I have come by.' The lender said, 'Allah has delivered on your behalf the money you sent in the piece of wood. So, you may keep your one thousand Dinars and depart guided on the right path.' "