The Messenger of Allah ﷺ said, "When one of you is praying, he should not let anyone pass in front of him. Let him push the person away as much as he can, and if he refuses, let him fight him, for he is none other than a devil."
حدثنا القعنبي عن مالك عن زيد بن أسلم عن عبد الرحمن بن أبي سعيد الخدري
أن رسول الله ﷺ قال إذا كان أحدكم يصلي فلا يدع أحدا يمر بين يديه وليدرأه ما استطاع فإن أبى فليقاتله فإنما هو شيطان
Muslim reported it, Prayer, chapter on preventing one who passes in front of the person praying, hadith no. 505, from the hadith of Malik through this chain, and it is found in Muwatta (Yahya), 1/154. Bukhari also reported it, hadith no. 509, through another route from Abu Saeed, in a longer form.