Sahih al-Bukhari, Hadith 3470

Narrated Abu Sa`id Al-Khudri: The Prophet said, "Amongst the men of Bani Israel there was a man who had murdered ninety-nine persons. Then he set out asking (whether his repentance could be accepted or not). He came upon a monk and asked him if his repentance could be accepted. The monk replied in the negative and so the man killed him. He kept on asking till a man advised to go to such and such village. (So he left for it) but death overtook him on the way. While dying, he turned his chest towards that village (where he had hoped his repentance would be accepted), and so the angels of mercy and the angels of punishment quarrelled amongst themselves regarding him. Allah ordered the village (towards which he was going) to come closer to him, and ordered the village (whence he had come), to go far away, and then He ordered the angels to measure the distances between his body and the two villages. So he was found to be one span closer to the village (he was going to). So he was forgiven."

حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا مُحَمَّدُ بْنُ أَبِي عَدِيٍّ، عَنْ شُعْبَةَ، عَنْ قَتَادَةَ، عَنْ أَبِي الصِّدِّيقِ النَّاجِيِّ، عَنْ أَبِي سَعِيدٍ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ كَانَ فِي بَنِي إِسْرَائِيلَ رَجُلٌ قَتَلَ تِسْعَةً وَتِسْعِينَ إِنْسَانًا ثُمَّ خَرَجَ يَسْأَلُ، فَأَتَى رَاهِبًا فَسَأَلَهُ، فَقَالَ لَهُ هَلْ مِنْ تَوْبَةٍ قَالَ لاَ‏.‏ فَقَتَلَهُ، فَجَعَلَ يَسْأَلُ، فَقَالَ لَهُ رَجُلٌ ائْتِ قَرْيَةَ كَذَا وَكَذَا‏.‏ فَأَدْرَكَهُ الْمَوْتُ فَنَاءَ بِصَدْرِهِ نَحْوَهَا، فَاخْتَصَمَتْ فِيهِ مَلاَئِكَةُ الرَّحْمَةِ وَمَلاَئِكَةُ الْعَذَابِ، فَأَوْحَى اللَّهُ إِلَى هَذِهِ أَنْ تَقَرَّبِي‏.‏ وَأَوْحَى اللَّهُ إِلَى هَذِهِ أَنْ تَبَاعَدِي‏.‏ وَقَالَ قِيسُوا مَا بَيْنَهُمَا‏.‏ فَوُجِدَ إِلَى هَذِهِ أَقْرَبُ بِشِبْرٍ، فَغُفِرَ لَهُ ‏" ‏‏.‏

sunnah.com