Surely Allah was pleased towards the believers when they were pledging to you under the tree; then He knew what was in their hearts, then He sent down tranquility upon them, and He rewarded them with a nearby Victory.
The pledge mentioned in this verse refers to the pledge done by the believers under a tree at ‘Hudaibiya’, declaring that they were ready for anything in the way of Allah, including martyrdom, as explained in verse 10 of this Surath. Then Allah increased their belief and sent down peace and tranquility to them, just like He increased Guidance to the companions of the cave as mentioned in verse 18: 13. ‘The nearby Victory’ mentioned in this verse refers to ‘the Meccan Victory’ that happened on the 8th of Hijra. See explanation 5: 119; 33: 35; and 48: 4.