Hatib bin Abu Balta wrote to the people of Mecca informing them that the Messenger of Allah ﷺ intended to launch a military campaign against them. The Messenger of Allah ﷺ was guided to the woman who was carrying the letter, so he sent for her and retrieved the letter from her hair.He said, "Hatib, did you do this?"He replied, "Yes, but I did not do it out of treachery toward the Messenger of Allah ﷺ," (Yunus narrated it as, "out of treachery, Messenger of Allah,") "nor out of hypocrisy. I knew that Allah would grant victory to His Messenger and complete His affair for him. It is just that I was an outsider with no tribal protection among them, and my mother was living among them, so I wanted to do them this favor so they might protect her."Umar said, "Shall I strike off this man's head?"The Prophet ﷺ replied, "Would you kill a man who fought at Badr? How do you know? Perhaps Allah has looked upon the people of Badr and said, 'Do as you wish.'"
أن حاطب بن أبي بلتعة كتب إلى أهل مكة يذكر أن رسول الله ﷺ أراد غزوهم، فدل رسول الله ﷺ على المرأة التي معها الكتاب، فأرسل إليها، فأخذ كتابها من رأسها، وقال: يا حاطب أفعلت؟ قال: نعم، أما إني لم أفعله غشا لرسول الله ﷺ- وقال يونس: غشا يا رسول الله- ولا نفاقا، قد علمت أن الله مظهر رسوله، ومتم له أمره، غير أني كنت عزيزا بين ظهريهم، وكانت والدتي معهم، فأردت أن أتخذ هذا عندهم، فقال له عمر: ألا أضرب رأس هذا؟ قال: أتقتل رجلا من أهل بدر؟ ما يدريك لعل الله قد اطلع على أهل بدر فقال: اعملوا ما شئتم.
Narrated by Ahmad (14774), Abu Yaala (2265), and Ibn Hibban (4797), all of them through routes from Layth bin Saad, from Abu Zubayr, from Jabir, who mentioned it. The wording is Ahmad's, and its isnad is sahih.