(10) Indeed, those who pledge allegiance to you, [O Muhammad] - they are actually pledging allegiance to Allah. The hand of Allah is over their hands. So he who breaks his word only breaks it to the detriment of himself. And he who fulfills that which he has promised Allah - He will give him a great reward.
(18) Certainly was Allah pleased with the believers when they pledged allegiance to you, [O Muhammad], under the tree, and He knew what was in their hearts, so He sent down tranquillity upon them and rewarded them with an imminent conquest. (19) And much war booty which they will take. And ever is Allah Exalted in Might and Wise. (20) Allah has promised you much booty that you will take [in the future] and has hastened for you this [victory] and withheld the hands of people from you - that it may be a sign for the believers and [that] He may guide you to a straight path. (21) And [He promises] other [victories] that you were [so far] unable to [realize] which Allah has already encompassed. And ever is Allah, over all things, competent. (22) And if those [Makkans] who disbelieve had fought you, they would have turned their backs [in flight]. Then they would not find a protector or a helper. (23) [This is] the established way of Allah which has occurred before. And never will you find in the way of Allah any change.
I pledged allegiance to the Messenger of Allah (PBUH), then I went to the shade of a tree. When the people had gone away from the Messenger of Allah (PBUH), he said: O Ibn Al-Akwa', will you not pledge allegiance? I replied: I have pledged allegiance, O Messenger of Allah (PBUH). He said: Do it again. So I pledged allegiance to him a second time. Yazid said: So I asked: O Abu Muslim [Ibn Al-Akwa'], unto what did you pledge allegiance on that day? He said: Unto death.
I witnessed the Messenger of Allah (PBUH) on the day of Al-Hudeibiyah, taking pledges of allegiance from people while I was holding a branch of the Tree over his head. They pledged allegiance to him that they would not flee, and they were one thousand and four hundred on that day.