But whosoever repents after his crime and does righteous good deeds, then verily, Allah will pardon him. Verily, Allah is Oft-Forgiving, Most Merciful.
Therefore, whoever repents and goes back to Allah after he commits theft, then Allah will forgive him.
Imam Ahmad recorded that Abdullah bin `Amr said that;
a woman committed theft during the time of the Messenger of Allah and those from whom she stole brought her and said, "O Allah's Messenger! This woman stole from us."
Her people said, "We ransom her."
The Messenger of Allah said,
اقْطَعُوا يَدَهَا
Cut off her hand.
They said, "We ransom her with five hundred Dinars."
The Prophet said,
اقْطَعُوا يَدَهَا
Cut off her hand.
Her right hand was cut off and the woman asked, "O Messenger of Allah! Is there a chance for me to repent?"
He said,
نَعَمْ أَنْتِ الْيَوْمَ مِنْ خَطِييَتِكِ كَيَوْمَ وَلَدَتْكِ أُمُّك
Yes. This day, you are free from your sin just as the day your mother gave birth to you.
Allah sent down the verse in Surah Al-Ma'idah,
فَمَن تَابَ مِن بَعْدِ ظُلْمِهِ وَأَصْلَحَ فَإِنَّ اللّهَ يَتُوبُ عَلَيْهِ إِنَّ اللّهَ غَفُورٌ رَّحِيمٌ
But whosoever repents after his crime and does righteous good deeds (by obeying Allah), then verily, Allah will pardon him. Verily, Allah is Oft-Forgiving, Most Merciful.
This woman was from the tribe of Makhzum. Her story was narrated in the Two Sahihs from Az-Zuhri from Urwah from Aishah.
The incident caused concern for the Quraysh after she committed the theft during the time of the battle of the Conquest (of Makkah). They said, "Who can talk to Allah's Messenger about her matter."
They then said, "Who dares speak to him about such matters other than Usamah bin Zayd, his loved one."
When the woman was brought to the Messenger of Allah, Usamah bin Zayd talked to him about her and the face of the Messenger changed color (because of anger) and he said,
أَتَشْفَعُ فِي حَدَ مِنْ حُدُودِ اللهِ عَزَّ وَجَلَّ
Do you intercede in a punishment prescribed by Allah?
Usamah said to him, "Ask Allah to forgive me, O Allah's Messenger!"
During that night, the Messenger of Allah stood up and gave a speech and praised Allah as He deserves to be praised. He then said,
أَمَّا بَعْدُ فَإِنَّمَا أَهْلَكَ الَّذِينَ مِنْ قَبْلِكُمْ أَنَّهُمْ كَانُوا إِذَا سَرَقَ فِيهِمُ الشَّرِيفُ تَرَكُوهُ وَإِذَا سَرَقَ فِيهِمُ الضَّعِيفُ أَقَامُوا عَلَيْهِ الْحَدَّ
Those who were before you were destroyed because when an honorable person among them would steal, they would leave him. But, when a weak man among them stole, they implemented the prescribed punishment against him.
وَإِنِّي وَالَّذِي نَفْسِي بِيَدِهِ لَوْ أَنَّ فَاطِمَةَ بِنْتَ مُحَمَّدٍ سَرَقَتْ لَقَطَعْتُ يَدَهَا
By Him in Whose Hand is my soul! If Fatimah the daughter of Muhammad stole, I will have her hand cut off.
The Prophet commanded that the hand of the woman who stole be cut off, and it was cut off.
Aishah said, `Her repentance was sincere afterwards, and she got married and she used to come to me so that I convey her needs to the Messenger of Allah."
This is the wording that Muslim collected, and in another narration by Muslim, Aishah said,
"She was a woman from Makhzum who used to borrow things and deny that she took them. So the Prophet ordered that her hand be cut off."
Allah then said