Al-Fath: (18) "Allah was certainly pleased..."
This is the Pledge of Ridwan (the Pledge of Pleasure). It was named after this verse. Its story is as follows:
When the Prophet (ﷺ) arrived at al-Hudaybiyyah, he sent Khirash ibn Umayyah al-Khuza'i as an envoy to the people of Mecca. They intended to harm him, but the Ahabish (tribal allies) protected him. When he returned, the Prophet (ﷺ) called for Umar (ra) to send him. Umar said: "I fear for my life among them, for they know my enmity toward them, and there is no one in Mecca from my clan to protect me. However, I will direct you to a man who is more honored there than I and more beloved to them: Uthman ibn Affan."
The Prophet (ﷺ) sent Uthman, who informed them that he had not come for war, but as a visitor to the House, honoring its sanctity. They respected him and said: "If you wish to circumambulate the House, do so." He replied: "I would not do so before the Messenger of Allah (ﷺ) does." He was detained by them, and a rumor spread that he had been killed. The Messenger of Allah (ﷺ) said: "We shall not depart until we confront the people," and he called the people to pledge allegiance. They pledged to him under the tree, which was a samurah (acacia). Jabir ibn Abdullah said: "If I still had my sight, I would show you its location."
It is said that the Messenger of Allah (ﷺ) was sitting at the base of the tree, with one of its branches over his back. Abdullah ibn al-Mughaffal said: "I was standing at his head, holding a branch of the tree to shield him, and I lifted it from his back." They pledged to him that they would die for his sake and that they would not flee. The Messenger of Allah (ﷺ) said to them: "You are today the best of the people on earth." The number of those who pledged was 1,525; others say 1,400, and others say 1,300.
"He knew what was in their hearts"
Meaning: He knew their sincerity and the truth of their intentions regarding what they pledged.
"So He sent down tranquility upon them"
Meaning: Reassurance and security, due to the peace treaty, upon their hearts.
"And rewarded them with a near victory"
It is also recited as wa-atahum (and He gave them). This refers to the conquest of Khaybar following their departure from Mecca. According to al-Hasan, it refers to the conquest of Hajar, which was a great victory, as they benefited from its fruits for a long time.
"And much spoils which they will take"
These are the spoils of Khaybar. It was a land of property and wealth, which the Messenger of Allah (ﷺ) divided among them. Then Uthman came to him with the peace proposal, so he made peace with them and departed after sacrificing and shaving his head at al-Hudaybiyyah.
"Allah promised you much spoils which you will take, so He hastened this for you and withheld the hands of the people from you, that it may be a sign for the believers and [that] He may guide you to a straight path."