The Prophet of Allah ﷺ passed by a man who was prostrating as he was on his way to the prayer. He completed the prayer and returned to find the man still prostrating. The Prophet ﷺ stood up and asked, "Who will kill this man?"A man stood up, rolled up his sleeves, drew his sword, and brandished it. Then he said, "Prophet of Allah, may my father and mother be ransomed for you, how can I kill a man who is prostrating, bearing witness that there is no god but Allah and that Muhammad is His servant and messenger?"Then the Prophet asked again, "Who will kill this man?"Another man stood up and said, "I will." He rolled up his sleeves, drew his sword, and brandished it until his hand trembled. Then he said, "Prophet of Allah, how can I kill a man who is prostrating, bearing witness that there is no god but Allah and that Muhammad is His servant and messenger?"The Prophet ﷺ then said, "By the One in whose hand is the soul of Muhammad, had you killed him, he would have been the first and the last of a great trial."
أن نبي الله ﷺ مر برجل ساجد، وهو ينطلق إلى الصلاة، فقضى الصلاة، ورجع عليه وهو ساجد، فقام النبي ﷺ، فقال: من يقتل هذا؟ فقام رجل، فحسر عن يديه، فاخترط سيفه وهزه، ثم قال: يا نبي الله، بأبي أنت وأمي، كيف أقتل رجلا ساجدا، يشهد أن لا إله إلا الله، وأن محمدا عبده ورسوله؟ ثم قال: من يقتل هذا؟ فقام رجل، فقال: أنا، فحسر عن ذراعيه، واخترط سيفه، وهزه حتى أرعدت يده، فقال: يا نبي الله، كيف أقتل رجلا ساجدا، يشهد أن لا إله إلا الله، وأن محمدا عبده ورسوله؟ فقال النبي ﷺ: والذي نفس محمد بيده لو قتلتموه، لكان أول فتنة وآخرها.
Ahmad (20431) and Ibn Abu Asim in Sunnah (971) both narrated it through the hadith of Rawh bin Ubada, who said, "Uthman Shahham narrated to us, saying, Muslim bin Abu Bakra narrated to us, from his father," and he related it.Its isnad is hasan because of Uthman bin Shahham and Muslim bin Abu Bakra, for both of them are graded hasan narrators.His statement, "If you had killed him, it would have been the first strife and the last of it," indicates that the Prophet ﷺ did not resolve to kill a man who was praying, because killing him would have caused great strife. However, this story has been narrated with different wordings, some of which go back to differences among the narrators, and the summary is as I have stated.