It was a dark night on which the burglar scaled the wall of Malik bin Dinar's house and stealthily made his way inside. To his utter disappointment, the thief found nothing in the house that was worth stealing; what's more, the occupant of the house was actually inside and was busy praying.
Malik bin Dinar sensed the movement of the burglar, but without becoming alarmed, he turned around with perfect composure and extended greetings of peace to him. He then said, "My brother, may Allah forgive you. You entered my home and found nothing worth taking, but I will not allow you to leave without gaining some benefit."
Malik stood up, approached the burglar with a jug of water in his hands, and said, "Here, perform ablution and perform two units of prayer. If you do so, you will take away with you that which is better than what you came to find in the first place."
"Yes, how generous of you," said the burglar, somewhat stupefied and, more than anything else, humbled. He stood, made ablution, and performed two units of prayer. Upon completing them, he turned and said, "O Malik, will I be imposing upon you if I perform two more units of prayer."
"Perform as much as Allah decrees for you," said Malik. The burglar turned worshipper continued to pray until the morning, at which time Malik said, "Go, and be good."
"Will I be imposing upon you if I stay here with you today, for I have made the intention to fast today."
"Stay as long as you want," said Malik. The man stayed with Malik for a number of days, spending the days fasting, and the nights standing up for prayer. Finally deciding to leave, the man said, "O Malik, I have made up my mind to repent."
"That (i.e., Allah forgiving you and guiding you to repent) is in the Hands of Allah 'Azza wa-jal (the Possessor of might and majesty)," said Malik.
And in fact, the man did mend his ways and repented for his previous wayward existence. When the man left Malik's home, he came across another burglar he knew. Seeing the happy and serene expression on the man's face, the burglar said, "I think you have finally found your treasure?"
"My brother," he answered, "I found Malik bin Dinar. I went to steal from him, but it was he who stole something of mine-my heart. Indeed I have repented to Allah 'Azza wa-jal (the Possessor of might and majesty), and I will remain at the door (of His Mercy and Forgiveness) until I achieve what His obedient, loving slaves have achieved." 
Al-Mawa'iz Wal-Majalis, pg 65
 Al-Mawa'iz Wal-Majalis, pg 85