Sahih Muslim Book 20, Hadith Number 4580.

Chapter : It is good on the part of a leader to take the oath of allegiance from his forces when intending to fight, and an account of the allegiance of God’s pleasure under the tree.

It has been narrated (through a different chain of transmitters) on the authority of Jabir who said: We were one thousand and four hundred on the Day of Hudaibiya when the Holy Prophet (may peace be upon him) said to us: Today you are the best people on the earth. And Jabir said: If I had the eyesight, I could show you the place of the tree.