Short answer
Yes, if needed. The Prophet ﷺ prayed carrying his granddaughter Umamah, putting her down for sajdah and picking her up when he stood. A child climbing on your back in sajdah does not affect the prayer. In the Hanafi school keep movements small, because a lot of handling can break the prayer, and make sure the child's nappy is not leaking.
Carrying a child or letting a child climb on you does not break the prayer when the movement is small; much movement, such as repeatedly lifting a child with both hands, can amount to 'amal kathir and break it. If the child is held by you and has impurity on its body or clothes that is not contained, beyond the excused amount, the prayer is affected; if the child sits on you by itself, it is not.
The four schools agree on this.
Explanation
Abu Qatadah reported that the Prophet ﷺ led the prayer carrying Umamah, the daughter of his daughter Zaynab: when he went into sajdah he put her down, and when he stood he picked her up. Another Companion described him staying long in sajdah, and when asked, he said his grandson had climbed onto his back and he did not want to rush him. The four schools agree that a child's presence and small movements for its sake do not break the prayer.
Practical guidance for parents:
- Child climbs on you in sajdah: stay in sajdah a little longer, or rise gently so the child slides off. No problem.
- Baby needs holding to stop crying: you may pick the baby up and hold it with one arm while standing, putting it down for ruku and sajdah, with as little movement as possible.
- Nappies: a clean, sealed nappy is fine. If the baby's clothes are soiled, do not hold it in prayer.
- Danger: if the child is about to fall, touch a hot stove or run into the street, break the prayer and start again.
- Fard vs nafl: in nafl prayers there is more ease; in the fard, keep your movements to what is needed.
Parents of young children often feel their prayers are never calm. Allah knows your situation; keep praying, and pray in the most peaceful moments you can find. See what breaks your salah, bringing children to the mosque and breaking the prayer for a parent or emergency.
The evidence
Sahih al-Bukhari 516
Sahih... كان يصلي وهو حامل أمامة بنت زينب ...
"He prayed carrying Umamah, the daughter of Zaynab; when he prostrated he put her down, and when he stood he picked her up."
Holding a child in prayer is allowed.
Sunan an-Nasa'i 1141
Grading to be checked... إن ابني ارتحلني فكرهت أن أعجله ...
"My son was riding on my back, and I did not want to rush him."
A child climbing on you in sajdah does not affect the prayer.
Where the ruling is recorded
- Radd al-Muhtar (Ibn Abidin), Kitab al-Salah, chapter on what invalidates the prayer. Much movement invalidates; carrying a child with little movement does not.
- al-Fatawa al-Hindiyya, Kitab al-Salah, chapter on what invalidates the prayer. A child with impurity sitting on the one praying by itself does not affect the prayer, unlike one he is holding.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.