A      woman walked in front of our row when we were praying in jamaa’ah
Question

A sister walked in front of a row of sisters praying behind the imaam. (There were only a few of us in the row and the sister walked so quickly that we could not stop her before she took her place in line.)I understand that three things invalidate the prayer if they pass between the praying person and the sutra, which are the donkey, black dog, and a woman . How should we start our prayer again and still follow the imaam ?
Praise be to Allah.With regard to the idea that a person’s prayer is invalidated if a woman, donkey or black dog passes in front of him, this is correct.
 It was reported from ‘Abd-Allah ibn al-Saamit that Abu Dharr said: “The Messenger of Allah (peace and blessings of Allah be upon him) said: ‘If any one of you stands up to pray, then he has a sutrah [an item placed in front of a praying person as a “screen”] if he has something the height of the back of a saddle in front of him. If he does not have something the height of the back of a saddle in front of him, then his prayer is invalidated if a donkey or a woman or a black dog passes in front of him.’” I [‘Abd-Allah] asked, “O Abu Dharr, what is the difference between a black dog and a red or yellow dog?” He said, “O son of my brother, I asked the Messenger of Allah (peace and blessings of Allah be upon him) the same question, and he said, ‘The black dog is a shaytaan (devil).’” (Narrated by Muslim, 510).
 The height of the back of a saddle is one cubit or 2/3 of a cubit.
 But this ruling applies only when one of these three pass in front of the imaam or a person who is praying on his own, not when they pass between the rows of a congregation praying behind the imaam during prayer in jamaa’ah, as the sister who asked the question thinks.
 The evidence for that is the report in which ‘Abd-Allah ibn ‘Abbaas said: “I came along riding on a female donkey one day when I had just reached the age of puberty. The Messenger of Allah (peace and blessings of Allah be upon him) was leading the people in prayer in Mina, without any kind of wall in front of him. I passed in front of part of the row, then I got down and sent the donkey to graze, and joined the row, and no one rebuked me for that.” (Narrated by al-Bukhari, 472; Muslim, 504)
 Imaam al-Bukhari gave this hadeeth the heading of “Sutrat al-Imaam sutrat man khalfahu (the sutrah of the imaam is the sutrah of those behind him).” This hadeeth clearly proves our point, which is that the person who is praying behind the imaam does not have to have a sutrah, and it does not matter what passes in front of him, especially since Ibn ‘Abbaas passed in front of them with his donkey, which is one of the things which invalidates prayer if it passes in front of the imaam or a person who is praying on his own.
 Ibn ‘Abd al-Barr said:
 This hadeeth – i.e., the hadeeth narrated by al-Bukhari (487) and Muslim (505) from Abu Sa’eed al-Khudri which says “If any one of you is praying, he should not let anyone pass in front of him. Let him push him away as much as he can, and if he insists then let him fight him, for he is nothing but a shaytaan (devil)” – indicates that it is makrooh to pass in front of a person who is praying if he is praying on his own and without a sutrah. The same ruling applies to the imaam if he is praying without a sutrah. But with regard to the person who is praying behind the imaam, it does not matter what passes in front of him, just as it does not matter what passes in front of the imaam or person praying alone if it passes behind the sutrah. The sutrah of the imaam is also the sutrah of those who are praying behind him.
 We say this concerning the imaam and the person who prays alone, because the Prophet (peace and blessings of Allah be upon him) said, “If any one of you is praying…” According to the scholars, this means praying on his own, because of the hadeeth of Ibn ‘Abbaas. Hence we say that the person who is praying behind the imaam does not have to push away the person who passes in front of him, because Ibn ‘Abbaas said:“I came along riding on a female donkey one day when I had just reached the age of puberty. The Messenger of Allah (peace and blessings of Allah be upon him) was leading the people in prayer in Mina, without any kind of wall in front of him. I passed in front of part of the row, then I got down and sent the donkey to graze, and joined the row, and no one rebuked me for that.”(al-Tamheed, 4/187)
 On this basis, the sister who asked this question, and other people, do not have to push away anyone who passes in front of them if they are praying behind the imaam, and there is no sin on the person who passes in front of the row if this is donefor a reason. Pushing a person away and preventing them from passing in front is to be done by the imaam or the person who is praying alone, if a person wants to pass between him and his sutrah.
And Allah knows best.