“Abu ‘Abd Allah, ‘Alayhi al-Salam, has said, ‘In banu Israel there was a king who had a judge who had a brother who was truthful and had a wife who had given birth to prophets. The king decided to send a person for a certain task so he asked his judge to find for him a reliable person. The judge said, ‘I do not know anyone more truthful than my brother.’
He called him to go for the task but he did not like it and said to his brother, ‘I am afraid I may lose my wife.’ He insisted and the man could not do anything but to go for the task. He told his brother, ‘Brother, of the things that I leave behind no other thing is more important to me than my wife. Please take good care of her in whatever matters she may need.’ His brother agreed and the man left for the task of the king but the woman did not like his leaving.
The judge would come and ask her if she needed anything and would provide whatever she needed. He liked her and asked her to yield to his demand but she refused. He swore that if she did not agree he can inform the king that she has committed fornication. She said, ‘I cannot yield to your demand and you can do whatever you like.’ He went to the king and said, ‘The wife of my brother has committed fornication and it is proved before me.’ The king said, ‘Cleanse her.’ He went to her and said, ‘The king has commanded me to stone you to death. What do you say now? I can stone you to death if you do not agree with what I ask you to do.’ She said, ‘I cannot agree with what you wish, so you can do whatever you like.’ He took her out and placed her in a ditch and stoned, while people were with him. When he thought she was dead he left her and returned.
When it became dark in the night and she was still alive she moved out of the ditch and dragged herself on her face out of the city to a monastery where a monk lived. She waited at the door until the morning when the monk opened the door, saw her and asked her about her story. She informed him about it, he felt sympathy for her, took her inside. He had a small son who was his only son in good condition. He treated her injuries until she was cured and gave his son to her to provide him care. The monk had an agent who worked for him. He liked the woman and asked her to yield to his demand but she refused. He tried hard but she did not yield to his demand and he said, ‘If you do not agree I will try to kill you.’ She said, ‘I cannot agree with what you want, so you can do whatever you wish.’ He attacked the child (instead) and cut his neck. He went to the monk and said, ‘You entrusted a fornicator who committed fornication. You left your son with her and she has killed him.’ The monk came to her and when he saw him he asked her, ‘What is this? You know I helped you.’ She informed him of her story and he said, ‘I cannot feel good for you any more if you stay with me; so leave my place.’ He made her to move away in the night, gave her twenty dirham, told her to spend it and that Allah will sufficiently support her.
During the night she left and in the morning she arrived in a town where a man was being crucified, but he was still alive. She asked about his case and they said that he owed twenty dirham which he could not pay. Whoever cannot pay his debts is crucified according to the rules of the town unless he pays it off to his creditor. She took out the twenty dirham, paid to his creditor and asked them to release him. They brought him down from the hanging pole and he said to her, ‘No one has ever done a favor to me greater than what you have done to me. You have saved me from being crucified and from death, thus I must serve you wherever you go.’ He followed her until they came to the shore and saw a group of people and a ship. He asked her, ‘Stay here so I go work for them to get food for you.’ He went to them and asked, ‘What does your ship carry?’ They replied, ‘It carries goods for business, like pearls, Ambergris and so on and we use this one for our own ride.’ He then asked, ‘How much is the value of the goods in your ship?’ They replied, ‘It is a great deal; we cannot count.’ He then said, ‘I have something with me who is better than what is in your ship.’ They asked, ‘What is with you?’ he replied, ‘There is a girl with me the like of whom you have never seen.’ They asked, ‘Do you sell her?’ He replied, ‘Yes, I want to sell her with the condition that one of you come with me to see her, then you can buy her from me and pay without telling her about it until I go away.’ They said; ‘It is up to you.’ They sent one of them to look at her and that person said, ‘I have never seen anyone like her in beauty.’ They bought her from him for ten thousand dirham and paid him.
He moved away and when he was far away they came to her and told her to move in the ship. She asked, ‘Why must I move in the ship?’ They replied, ‘We have bought you from your master.’ She said, ‘He is not my master.’ They said, ‘Will you move on your own or we carry you in the ship?’ She then walked with them and when they arrived at the shore, they could not trust each other about her, so they kept her in the ship with goods for trading and they themselves stayed in the other ship and set it to sail. Allah, most Majestic, most Glorious, sent winds that made all of them drown as well as their ship but she remained safe with the ship loaded with goods for trading until she arrived in an island of the islands of the sea. She tied down the ship and walked on the island, found water, trees and fruits. She said, ‘From this water I will drink and from these fruits I will eat and worship Allah in this place.’
Allah, most Majestic, most Glorious, then sent revelation to a prophet of the prophets of banu Israel to go to that king and tell him, ‘On such and such island there is one of My servants. You and the people in your domain must go to my servant who is there and confess your sins before My servant there then ask that creature to forgive you; if that creature forgives you I will also forgive you.’ The king along with the people in his dominion went to that island and saw a woman. The king came to her and said, ‘My judge told me that his brother’s wife has committed fornication and I commanded to stone her to death but no testimony was presented before me and I am afraid that I may have done something unlawful and I like that you ask forgiveness for me.’ She said, ‘Allah has forgiven you. Please sit down.’ Then her husband came. He could not recognize her and said, ‘I had a very excellent and virtuous wife but I left her when she did not like and I left her in the care of my brother. When I came back and asked about her, my brother told me that she had committed fornication and he stoned her to death and I am afraid that I may have lost her so ask forgiveness for me.’ She said, ‘Allah has forgiven you’, and she made him to sit next to the king. Then the judge came and said, ‘My brother had a wife who attracted me and I asked her to commit fornication but she refused and I informed the king that she has committed fornication and he commanded me to stone her to death. I stoned her to death and I had lied against her, so please ask forgiveness for me.’ She said, ‘Allah has forgiven you.’ She then turned to her husband and asked him to listen. Then the monk came and told his story and said, ‘I sent her away in the night and I am afraid that wild beasts may have killed her.’ She said, ‘Allah has forgiven, you please sit down.’ Then the agent of the monk came and told his story and she asked the monk to listen, may Allah forgive you.
Then the man, who was to be crucified came and told his story but she said, ‘May Allah not forgive you.’
He (the Imam) said that she then turned to her husband and said, ‘I am your wife and whatever you heard is my story. I do not need any men anymore and I love that you take this ship with its contents and leave me by myself so I can worship Allah, most Majestic, most Glorious, on this island. As you have learned how much I have suffered at the hands of men.’ He agreed, took the ship with its contents and allowed her to do what she wanted. The king and people in his dominion returned.’”

Sanad: A number of our people have narrated from Ahmad ibn Muhammad from ibn Faddal from al-Hakam ibn Miskin from Ishaq ibn ‘Ammar who has said the above hadith

Source: al-Kafi, Volume 5, Chapter 381, Hadith #10 (See Image below)