Fiqh-us-Sunnah Volume 2, Supererogatory Prayer, Fiqh 2.108A.
If the fear [of the enemy] is great or fighting is taking place, each person is to pray individually to the best of his ability – that is, standing or riding, facing the qiblah or not facing the qiblah, making gestures for the ruku’ and sajjud- whatever he can do. He should make the gesture for his sajjud lower than that for his ruku’. He is excused from any of the acts of salah which he is unable to perform.
Ibn ‘Umar relates: “The Prophet described salatul khauf and said: ‘If the danger is greater than that, then [pray] standing or riding.”‘
In Sahih al-Bukhari, the wording is: “If the danger is greater than that, then pray while standing on your feet or riding, facing the qiblah or not facing the qiblah.” In Muslim’s version, Ibn ‘Umar is reported to have said: “If the danger is greater than that, then pray standing or riding and by making gestures.”