It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) led the people in prayer, and a donkey passed in front of them. ‘Ayyash bin Abi Rabi‘ah said (during the prayer) «سبحان الله وبحمده» "Allah is Pure, with His praise and excellence." When the Messenger of Allah (peace and blessings be upon him) finished the prayer with salam, he asked: "Who said «سبحان الله و بحمده» just now (in the prayer)?" ‘Ayyash bin Rabi‘ah said: O Messenger of Allah! I did. Because I heard that the prayer is invalidated if a donkey passes in front. The Prophet (peace and blessings be upon him) said: "The prayer is not invalidated by anything passing in front of it."