God’s Messenger led us in the prayer in time of danger and we drew up in two rows behind him with the enemy between us and the qibla. The Prophet said, "God is most great” and we all said it; then he bowed and we all bowed; then he raised his head after bowing and we all raised ours; then he and the row next him went down in prostration while the rear row stood facing the enemy; then when the Prophet finished the prostration and the row next him stood up, the rear row went down in prostration; then they stood up; then the rear row went to the front and the front row to the rear; then the Prophet bowed and we all bowed; then he raised his head after bowing and we all raised ours; then he and the row next him which had been in the rear in the first rak'a went down in prostration while the rear row stood facing the enemy; then when the Prophet and the row next him finished the prostration the rear row went down and prostrated them selves; then the Prophet, uttered the salutation and we all did so.
We went forward with God’s Messenger, and when we reached Dhat ar-Riqa‘ we came to a shady tree which we left for him. One of the polytheists came along and seeing the sword of God’s Messenger hanging on a tree he took it, drew it from the scabbard and said to him, "Are you afraid of me?” On being told that he was not, he asked, “Who will protect you from me?” He replied, “God will protect me from you.” Then the companions of God’s Messenger threatened him, and he sheathed the sword and hung it up. The call to prayer was made and he led a section in two rak'as, after which they withdrew and he led the other section in two rak'as, so that God’s Messenger prayed four rak'as and the people prayed two.
Jabir said the Prophet was leading the people in the noon prayer in time of danger in a valley with palm trees.* He led a section in two rak'as after which he uttered the salutation; then another section came and he led them in two rak'as after which he uttered the salutation.
*The Arabic is bi-bain nakhl. Mirqat, 2, 244, says this is the name of a place between Mecca and at-Ta’if; but the name of that place is Nakhla. Alternatively it is said to be Batn an-nakhl near Medina.
transmitted it in Sharh as-sunna.
Yazid b. Ruman told on the authority of Salih b. al-Khawwat on the authority of one who prayed in time of danger along with God’s Messenger at the battle of Dhat ar-Riqa'* that a section formed a line along with him and a section faced the enemy. He led the section which was along with him in a rak'a, then remained standing while they finished the prayer by themselves. They then departed and drew up in line facing the enemy, and when the other party came he led them in the remaining rak'a of his prayer, after which he remained seated while they finished the prayer by themselves. He then led them in uttering the salutation.
* This was during an expedition against some sections of Ghatafan in 4 A.H
(Bukhari and Muslim.) Bukhari rendered it also by another line from al-Qasim from Salih b. al-Khawwat from Sahl b. Abu Hathma from the Prophet.