Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates from the Messenger of Allah (peace and blessings be upon him) that he (peace and blessings be upon him) mentioned a man from the Children of Israel: "He asked another man of the Children of Israel to lend him a thousand dinars. He said: Bring witnesses whom I can rely on. The one asking for the loan said: Allah is sufficient as a witness. Then he said: Bring a guarantor. He said: Allah is sufficient as a guarantor too. So he lent it to him for a fixed term. Taking the loan, he set out on a sea voyage. He began searching for a vessel by which he could cross the sea and reach the lender by the fixed term that had been agreed with him, but he found no vessel. Finally he took a piece of wood, made a hole in it, placed a thousand dinars and a letter in it, sealed its opening and brought it to the sea. Then he said: O Allah, You know that I borrowed a thousand dinars from so-and-so. He asked me for a guarantor and I said: My guarantor is Allah, and he was pleased with You. He asked me for witnesses and I gave the same answer, and he was pleased with You. I have tried hard to find a vessel by which I could send his debt to him, but I could not find one, so I now entrust it to You. So he cast that wood into the sea. Now it was in the sea, and he went back, still anxious to find a ship so that he could go to his town. Meanwhile, the man who had given the loan came out looking, hoping that some ship might have brought his money, but there he found a piece of wood, and he took it as firewood for his household. When he split it open, the dinars came out of it, along with a letter. Then the borrower came to his house, gave him a thousand dinars and said: By Allah, I kept trying to find a vessel to return your money to you, but I found no vessel before the one in which I have arrived. Then the man asked: Had you sent anything to me earlier? The debtor answered: Yes. Then he said: Allah has paid off on your behalf the debt that you sent in the wood. So he went back with his thousand dinars."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الضمان / 11413