Is prayer valid if the praying person is carrying a pure animal or a child?
Chapter on Praying with Impurity and Other Matters
Al-Mughni
Book of Prayer
Primary text
The prayer is not invalidated by carrying a pure animal or a child during the prayer. This is supported by the action of the Prophet, peace and blessings be upon him, who prayed while carrying Umamah, the daughter of Abu al-'As. Furthermore, when Al-Hasan and Al-Husayn rode on his back while he was prostrating, the prayer remained valid. The impurity within an animal's stomach is treated like the impurity within the stomach of the praying person.
Supporting text
If a sealed container holding impurity is carried, the prayer is invalid. Some Shafi'i scholars argue the prayer remains valid because the impurity has not exited the container, making it equivalent to carrying an animal. This view is incorrect because it involves carrying an unexcusable impurity in a location other than its natural receptacle, akin to carrying it in one's sleeve.