Abu Saeed Khudri reported,

The Prophet ﷺ said, "Among the Children of Israil there was a man who killed ninety-nine people. Then he went out asking about repentance. He came to a monk and asked him, 'Is there any repentance for me?'The monk said, 'No.'So he killed him.He continued asking, and a man told him, 'Go to such-and-such village.'Death overtook him on the way, and he leaned forward with his chest toward it. The angels of mercy and the angels of punishment disputed over him. Allah revealed to this village to draw near, and revealed to that one to move away. He said, 'Measure the distance between them.'He was found to be closer to the village he sought by a hand-span, so he was forgiven."

Bukhari 3470

Sahih

حدثنا محمد بن بشار حدثنا محمد بن أبي عدي عن شعبة عن قتادة عن أبي الصديق الناجي

عن أبي سعيد الخدري رضي الله عنه

عن النبي ﷺ قال كان في بني إسرائيل رجل قتل تسعة وتسعين إنسانا ثم خرج يسأل فأتى راهبا فسأله فقال له هل من توبة قال لا فقتله فجعل يسأل فقال له رجل ائت قرية كذا وكذا فأدركه الموت فناء بصدره نحوها فاختصمت فيه ملائكة الرحمة وملائكة العذاب فأوحى الله إلى هذه أن تقربي وأوحى الله إلى هذه أن تباعدي وقال قيسوا ما بينهما فوجد إلى هذه أقرب بشبر فغفر له

البخاري 3470صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Hadiths of the prophets
Chapter
Hadith of the cave
Numbering
Darussalam 3470
Bukhari 3470