The messenger of Allah(ﷺ) said: "When anyone of you stands to pray, then he is screened if he has in front of him something as high as the back of a camel saddle. If he does not have something as high as the back of a camel saddle in front of him, then his prayer is nullified by a woman, a donkey or a black dog." I (one of the narrators)said: "What is the difference between a black dog, a yellow one and a red one?" He said: I asked the Messenger of Allah (ﷺ) just like you and he said:"The black dog is a shaitan."
The Book of the Qiblah - Sunan an-Nasa'i 750
This hadith from Sunan an-Nasa'i addresses the important matter of sutrah (screen) during prayer and the nullifiers that can invalidate one's salah when no proper barrier is present.
The Requirement of Sutrah
The Prophet (ﷺ) established that a worshipper must have a barrier in front of them while praying, equivalent to the height of a camel saddle's back. This sutrah serves to demarcate the prayer space and prevent interruptions.
Scholars explain that this requirement applies to both obligatory and voluntary prayers, whether performed in mosque or elsewhere. The minimum height is approximately one handspan or the length of a bow.
Nullifiers of Prayer
When no proper sutrah is present, three specific entities can invalidate the prayer: a woman, a donkey, and a black dog. The scholars differ on whether this nullification occurs only when these pass directly in front of the worshipper or merely within the prayer area.
The Hanafi school holds that passing in front of the worshipper invalidates the prayer regardless of sutrah, while other schools maintain that proper sutrah prevents such nullification.
The Special Case of the Black Dog
The companion's question about different colored dogs reveals a crucial distinction. The Prophet (ﷺ) explicitly identified the black dog as a shaitan (devil).
Classical commentators explain that black dogs were specifically associated with devilish influences in pre-Islamic Arabian culture, and this ruling serves to distinguish Islamic practice from pagan customs. Some scholars suggest the black color represents the intensity of devilish nature.
Legal Rulings and Exceptions
Most scholars agree that the ruling applies specifically to mature women, donkeys, and black dogs. Other animals and colors of dogs do not nullify the prayer in the same manner.
Exceptions exist for cases where the woman is one's mahram (unmarriageable relative) or when the passing occurs at a considerable distance. The Maliki school is unique in not considering these as absolute nullifiers but rather as disliked acts.