Fiqh-us-Sunnah Volume 2, Supererogatory Prayer, Fiqh 2.108B.
If one is attacking the enemy and fears that he will miss the time of salah, he may pray by making gestures even if he is moving in a direction other than that of the qiblah. The case of the one who is being attacked is the same as the one who is attacking. The same is the case for anyone whose enemy prevents him from making the ruku’ or the sajdah or a person who fears for himself or his family or his wealth from an enemy or a thief or a wild animal; in all such cases, the person may [if necessary] pray by making gestures and facing any direction. Al-‘Iraqi writes: “The same applies to anyone who is fleeing from a flood or fire and has no other option open to him. The same is true for one who is in straitened conditions and is in debt and cannot pay it and he fears that his debtor might catch him and imprison him while not believing his claim. This applies also to one who fears a punishment of qisas and hopes that by his absence the prosecuting party’s anger will abate and they will forgive him.”
‘Abdullah ibn Unais reports: “The Messenger of Allah sent me to Khalid ibn Sufyan al-Hazhili, who was close to ‘Arafat, and said: ‘Go and kill him.’ I saw him and the time of the afternoon prayer came and I said [to myself]: ‘I fear that something between him and me will cause me to delay the salah, so I left walking and offered the salah by making gestures. When I came close to him, he said to me: ‘Who are you?’ I said: ‘A man from among the Arabs. It has reached me that you are gathering the people against this man [i.e the Prophet] so I came to you for that reason.’ He said: ‘I am doing that.’ I walked with him for a while until I could strike him dead with my sword.” This is related by Ahmad and Abu Dawud. AlHafiz says its chain is hasan.