The Prophet ﷺ said, "The prayer is invalidated, when there is nothing like the back of a saddle in front of the man, by a woman, a donkey, or a black dog."I asked, "What is the matter with a black dog rather than a red one?"He replied, "I asked the Messenger of Allah ﷺ just as you have asked me, and he said, 'The black dog is a devil.'"
حدثنا محمد بن بشار حدثنا محمد بن جعفر حدثنا شعبة عن حميد بن هلال عن عبد الله بن الصامت
عن النبي ﷺ قال يقطع الصلاة إذا لم يكن بين يدي الرجل مثل مؤخرة الرحل المرأة والحمار والكلب الأسود قال قلت ما بال الأسود من الأحمر قال سألت رسول الله ﷺ كما سألتني فقال الكلب الأسود شيطان
Reported by Muslim, in the Book of Prayer, chapter on the extent of what should shield one who is praying, hadith no. 510, from Muhammad bin Bashshar and others, with the same wording.