Ibn Kathir writes in the beginning of Surah al-Mumtahinah’s tafseer:
The story of Hatib bin Abi Balta`ah is the reason behind revealing the beginning of this honorable Surah. Hatib was among the Early Emigrants and participated in the battle of Badr. Hatib had children and wealth in Makkah, but he was not from the tribe of Quraysh. Rather, he was an ally of `Uthman. When the Messenger of Allah decided to conquer Makkah, after its people broke the peace treaty between them, he ordered the Muslims to mobilize their forces to attack Makkah, and then said,
«اللْهُمَّ عَمِّ عَلَيْهِمْ خَبَرَنَا»
(O Allah! Keep our news concealed from them.) Hatib wrote a letter and sent it to the people of Makkah, with a woman from the tribe of Quraysh, informing them of the Messenger’s intent to attack them. He wanted them to be indebted to him ﴿so that they would grant safety to his family in Makkah﴾. Allah the Exalted conveyed this matter to His Messenger , because He accepted the Prophet’s invocation ﴿to Him to conceal the news of the attack﴾. The Prophet sent someone after the woman and retrieved the letter. This story is collected in the Two Sahihs.
And then he goes on to mention this narration..
Volume 4, Book 52, Number 251 :
Narrated by ‘Ubaidullah bin Abi Rafi
I heard ‘Ali (radiallaahu `anhu) saying, “Allah’s Apostle (sallallaahu `alayhi wasallam) sent me, Az-Zubair and Al-Miqdad (radiallaahu `anhumaa) somewhere saying, ‘Proceed till you reach Rawdat Khakh. There you will find a lady with a letter. Take the letter from her.’ ” So, we set out and our horses ran at full pace till we got at Ar-Rawda where we found the lady and said (to her). “Take out the letter.” She replied, “I have no letter with me.” We said, “Either you take out the letter or else we will take off your clothes.” So, she took it out of her braid. We brought the letter to Allah’s Apostle (sallallaahu `alayhi wasallam) and it contained a statement from Hatib bin Abi Balta’ah (radiallaahu `anhu) to some of the Meccan pagans informing them of some of the intentions of Allah’s Apostle (sallallaahu `alayhi wasallam). Then Allah’s Apostle (sallallaahu `alayhi wasallam) said, “O Hatib! What is this?” Hatib (radiallaahu `anhu) replied, “O Allah’s Apostle! Don’t hasten to give your judgment about me. I was a man closely connected with the Quraish, but I did not belong to this tribe, while the other emigrants with you, had their relatives in Mecca who would protect their dependents and property . So, I wanted to recompense for my lacking blood relation to them by doing them a favor so that they might protect my dependents. I did this neither because of disbelief not apostasy nor out of preferring Kufr (disbelief) to Islam.” Allah’s Apostle (sallallaahu `alayhi wasallam) said, “Hatib has told you the truth.” Umar (radiallaahu `anhu) said, O Allah’s Apostle! Allow me to chop off the head of this hypocrite.” Allah’s Apostle (sallallaahu `alayhi wasallam) said, “Hatib participated in the battle of Badr, and who knows, perhaps Allah has already looked at the Badr warriors and said, ‘Do whatever you like, for I have forgiven you.”
Surah al-Mumtahinah’s first ayah was revealed about Hatib (radiallaahu `anhu):
﴿يأَيُّهَا الَّذِينَ ءَامَنُواْ لاَ تَتَّخِذُواْ عَدُوِّى وَعَدُوَّكُمْ أَوْلِيَآءَ﴾
“O you who believe! Take not my enemies and your enemies as protecting friends.” [60:1]
The ayah goes on to say: “while they have disbelieved in what has come to you of the truth”. It refers to the idolators and the disbelievers who are combatants against Allah, His Messenger and the believers. It is they whom Allah has decided should be our enemies and should be fought. Allah has forbidden the believers to take them as friends, supporters or companions. [Ibn Kathir]
I have one question. If the Prophet (sallallaahu `alayhi wasallam) can forgive a man for treason (more or less) based on his past record, why can’t we forgive people for much less complicated mistakes that they make? [Partly referring to the recent NAK incident and partly a general statement..]
Further reading: ruling on revealing secrets.