The Prophet ﷺ said, "Among the Children of Israil there was a man who had killed ninety-nine people. Then he set out asking about repentance. He came to a monk and asked him, 'Is there any repentance for me?'The monk replied, 'No.'So he killed him as well. He continued asking, and a man told him, 'Go to such-and-such a village.'Death overtook him on the way, and he strained his chest toward that village. The angels of mercy and the angels of punishment disputed over him. Allah revealed to this village to draw closer, and revealed to the other to move farther away, and He said, 'Measure the distance between them.' He was found to be closer to the village he was heading toward by a hand-span, so he was forgiven."
عن النبي ﷺ قال: كان في بني إسرائيل رجل قتل تسعة وتسعين إنسانا، ثم خرج يسأل، فأتى راهبا فسأله فقال له: هل من توبة؟ قال: لا، فقتله، فجعل يسأل، فقال له رجل: ائت قرية كذا وكذا، فأدركه الموت، فناء بصدره نحوها، فاختصمت فيه ملائكة الرحمة وملائكة العذاب، فأوحى الله إلى هذه أن تقربي، وأوحى الله إلى هذه أن تباعدي، وقال: قيسوا ما بينهما، فوجد إلى هذه أقرب بشبر، فغفر له.
Bukhari narrated it in the Book of Prophets (3470), and Muslim in the Book of Repentance and Seeking Forgiveness (2766:48), both from Muhammad bin Bashshar, who said, Muhammad bin Abu Adi narrated to us, from Shubah, from Qatada, from Abu Siddiq Naji, from Abu Saeed Khudri, and he related it.