´It was narrated that Jabir said:` "The Messenger of Allah (ﷺ) sent me on an errand then I came back to him while he was praying. I greeted him with the salam and he gestured to me. When he finished he called me and said: 'You greeted me with Salam just now and I was praying.' And he was facing toward the east that day."
Hadith Referenceسنن نسائي / كتاب السهو / 1190
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:صحيح مسلم
Hadith Takhrij«صحیح مسلم/المساجد 7 (540)، سنن ابن ماجہ/الإقامة 59 (1018) ، مسند احمد 3/334، (تحفة الأشراف: 2913) (صحیح)»
1؎ : The intent here is that at that time your (sallallahu alayhi wa sallam) face was not towards the qiblah, therefore I could not discern that you were in prayer. That is why you later called me and clarified the matter. And the reason for facing east was that you were on your mount at that time, and the mount had turned towards the east, away from the qiblah.
Explanation & Benefits
Hafiz Muhammad Ameen
1190. Commentary: "From the direction of the east" means that he was not facing the Ka'bah while performing the prayer, because in Madinah the qiblah is towards the south. However, during travel, it is not necessary to face the qiblah for voluntary (nafl) prayers. It is only required to face the qiblah at the beginning, and afterwards, regardless of which direction the mount turns, one should continue praying. From this, it is also established that it is permissible to greet someone who is praying, and for the one praying to respond with a gesture.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 1190