It is narrated about Sulaiman Yashkari that he inquired from Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) regarding performing a shortened prayer in a state of fear: Where was its ruling revealed and in what situation did this occur? He replied: We set out pursuing a caravan of the Quraysh that was heading to Syria. When we reached the place of Nakhl, a man came to the service of the Prophet Muhammad (peace and blessings be upon him). He had a sword with him. He asked: Are you Muhammad (peace and blessings be upon him)? The Prophet (peace and blessings be upon him) replied: Yes. He asked: Do you not fear me? The Prophet (peace and blessings be upon him) replied: No. He asked: Who will protect you from me? The Prophet (peace and blessings be upon him) replied: Allah Almighty will protect me from you. The narrator says: That man drew his sword, and the people scolded and rebuked him. The Prophet (peace and blessings be upon him) ordered the people to depart from there and to take up arms. Then the call to prayer was given. The Prophet (peace and blessings be upon him) led the group behind him in prayer, and another group faced the enemy and guarded. The Prophet (peace and blessings be upon him) led the group with him in two rak‘ahs, then the other group came and stood in the place where those who had prayed with the Prophet (peace and blessings be upon him) had stood, and they turned to face the enemy and began to guard. The Prophet (peace and blessings be upon him) also led these people in two rak‘ahs, so in this way the Prophet (peace and blessings be upon him) completed four rak‘ahs, and his companions performed two rak‘ahs.
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 2882
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «صحيح أبي داود» (1164).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح رجاله رجال الشيخين غير سليمان وهو ابن قيس اليشكري لم يخرجا له وهو ثقة