The Verse 48...
The Verse 48:18 was Revealed prior to the signing of the treaty of ‘ Hudaybiya’ , some Verses related to the pledge under the tree are given above, here some details relevant to the treaty of Hudaybiya are given. Briefly, the treaty of ‘ Hudaybiya ’ was a trial for Muslims like that of Bani Israel, as some Muslims who had pledged allegiance to Rasool-Allah -saww under the tree, could not sustain their support beyond few hours.
As a result, a number of them were overcome with disbelief and started doubting the ‘prophet-hood’ of Rasool-Allah -saww upon observing Rasool-Allah -saww signing the treaty (apparently the conditions of Hudaybiya were unfavourable).
And the one who turns back upon his heels, he will never harm Allah of anything and Allah would be Recompensing the grateful [3:144] Sulahay Hudaybiya (Treaty at the Place of Hudaybiya ) The treaty took place when the Rasool-Allah -saww and his companions went to perform Hajj of Kabah but were stopped by the ‘ Mushriqeen ’ (polytheists) of Makkah. In the end, a treaty was signed between the Muslims and Mushriqeen at the place of Hudaybiya .
Abu Abd Allah -asws (our 6 th Imam -asws ) has said; ‘The Rasool-Allah -saww marched (with his -saww companions) towards Al- Hudaybiya during the Month of Zeeqad (11 th Islamic month). When the Rasool-Allah -saww ended up at the place in which Ihram (for Hajj) had to be worn, they did so and they wore their weapons as well. When this news reached the ‘ Mushriqeen ’, they sent Khalid Bin Waleed to the Rasool-Allah -saww to block his -saww way.
So, the Rasool-Allah -saww adopted a different route and the caravan ended up at Al-Uqba.