Verily...
Verily, Allah was pleased with believers when they gave pledge to you under the tree [at Hudaybiyya]: He knew what was in their hearts [of faith and sincerity] and He sent down serenity upon them, and He rewarded them with a near triumph. 19. And abundant spoils that they will capture. And Allah is Ever Omnipotent, All-Wise. Giving pledge is a religious obligation whose keeping is obligatory and whose breaking is unlawful and entails evil consequences.
God Almighty is satisfied with the faith accompanied by loyalty to His Messenger (S). It is noteworthy that religion is not discrete from politics. God is satisfied with the believers pledging allegiance with their Prophet (S) in social and political issues. The blessed Verses are revealed on the occasion of the allegiance pledged at Hudaybiyya hence its designation bay’a al-ridhwan.
Believers gave their pledge to the Messenger of God (S) beneath a tree well-known as the tree of sammara (shajara al-sammara) at the village of Hudaybiyya. God Almighty was Aware that their pledge was devoid of sincerity and they obey the Messenger of Allah (S) in jihad. Consequently the blessed Verses in question were revealed to bear glad tidings to believers that owing to their pledge four things fell into their share: Obtaining Divine Satisfaction which is the most exalted Bounty.
Fortitude and perseverance through which their hearts find confidence and they persevere in their faith. Triumph which will shall into their faith soon, be it in the conquest of Khaybar, or as some maintain the conquest of Mecca. Abundant spoils which fall into their share. God Almighty is Omnipotent and Truthful and He acts upon Wisdom.
The preceding two Verses bore the glad tidings of early triumph which according to a number of Qur’anic exegets, e.g. Tabari, Shaykh Tusi, Zamakhshari, Maraghi, and Tabarsi, allude to the conquest of Khaybar. The fortress of Khaybar located two hundred kilometers from Medina.