A woman went out during the time of the Prophet ﷺ intending to pray when a man met her, covered her, and forced himself upon her. She cried out and he ran off. Another man passed by her, and she said to him, "That man did such and such to me." Then a group of the Muhajirun passed by, and she said to them, "That man did such and such to me." They went and seized the man whom she thought had assaulted her, and brought him to her.She said, "Yes, this is the one."They brought him to the Prophet ﷺ. When he ordered that the man be punished, the actual perpetrator stood up and said, "Messenger of Allah, I am the one who did it."He said to the woman, "Go, for Allah has forgiven you," and he spoke kindly to the accused man.
حدثنا محمد بن يحيى بن فارس حدثنا الفريابي حدثنا إسرائيل حدثنا سماك بن حرب
أن امرأة خرجت على عهد النبي ﷺ تريد الصلاة فتلقاها رجل فتجللها فقضى حاجته منها فصاحت وانطلق فمر عليها رجل فقالت إن ذاك فعل بي كذا وكذا ومرت عصابة من المهاجرين فقالت إن ذلك الرجل فعل بي كذا وكذا فانطلقوا فأخذوا الرجل الذي ظنت أنه وقع عليها فأتوها به فقالت نعم هو هذا فأتوا به النبي ﷺ فلما أمر به قام صاحبها الذي وقع عليها فقال يا رسول الله أنا صاحبها فقال لها اذهبي فقد غفر الله لك وقال للرجل قولا حسنا
[Its isnad is hasan] Tirmidhi narrated it, Hudud, chapter on what has been said about a woman who is forced into fornication, no. 1454, from Muhammad bin Yahya bin Faris Dhuhli through this route, and he said, hasan gharib sahih. Ibn Jarud also graded it sahih, no. 823.