Assalamualaikum ustaz. Is it true that the Messenger PBUH once carried a child while praying?
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
Answering this question, we present a hadith narrated from Abu Qatadah al-Ansari RA, he said:
أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ يُصَلِّي وَهْوَ حَامِلٌ أُمَامَةَ بِنْتَ زَيْنَبَ بِنْتِ رَسُولِ اللَّهِ صلى الله عليه وسلم وَلأَبِي الْعَاصِ بْنِ رَبِيعَةَ بْنِ عَبْدِ شَمْسٍ، فَإِذَا سَجَدَ وَضَعَهَا، وَإِذَا قَامَ حَمَلَهَا
“The Messenger of Allah, may Allah bless him and grant him peace, used to pray carrying Umama, who was the daughter of his daughter Zaynab  by Abu’l As ibn Rabia ibn Abd Shams. When he prostrated, he put her down, and when he got up, he carried her.” 
Likewise, it is also stated in another narration from Abu Qatadah RA, he said:
رَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَؤُمُّ النَّاسَ وَهُوَ حَامِلٌ أُمَامَةَ بِنْتَ أَبِي الْعَاصِ عَلَى عَاتِقِهِ فَإِذَا رَكَعَ وَضَعَهَا وَإِذَا رَفَعَ مِنْ سُجُودِهِ أَعَادَهَا
“I saw the Messenger of Allah (ﷺ)leading the people in prayer, carrying Umamah bint Abi Al-As on his shoulder. When he bowed, he put her down and when he stood up from prostration, he picked her up again.” 
According to the above hadith, we can see how honourable and great the Prophet PBUH’s love for his grandchildren, family and small children. This is what is brought by Rasullullah with his rahmatan lil ‘alamin attribute which is a blessing for all.
Imam al-Nawawi when commenting on this hadith stated: In this hadith, there is evidence that a person’s prayer is valid when he is carrying Adam’s child or pure animals such as bird or goat or others. Furthermore, the clothes and body of small children are pure until najis is identified. And indeed, small movements as such will not invalidate the prayer, even if the action is repeated several times but not consecutively, for it is performed separately (individually) does not invalidate the prayer. And in this hadith, there is guidance of tawadhu’ (humbleness) together with children and all those are weak, love them and be kind to them. 
According to madhhab al-Syafie, this hadith is evidence that it is permissible to carry small children whether they are boys or girls and pure animals in obligatory and sunnah prayer. It can be performed by the imam and makmum as well as a person who is praying alone. 
Whereas, Al-Hafiz Ibn Hajar al-Asqalani when commenting on this hadith said: “This hadith shows the permissibility of bringing children into the mosque. The same for touching small children and it doesn’t affect the taharah (purity). Likewise, for the validity of the prayer for a person who carries the children of Adam and also pure animals.” 
According to the above-stated hadiths, it clearly shows that Rasullullah PBUH did indeed had carried children when he prayed. However, one must ensure the purity of the child from najis and we suggest if it will make it hard to pray, then he should put the child under the care of another individual who is free at the time in order for him to pray.
 Umamah is the daughter of Abu al-As bin al-Rabi’ bin Abd al-‘Uzza bin Abd al-Syams bin Abd Manaf bin Qushai. Her mother is Zainab, Rasulullah SAW’s daughter. Umamah is the first grandchild of Rasulullah SAW. That it is reasonable to say that she was the Messenger’s favourite. As it is usually is for a grandfather when he gets his first grandchild.
In terms of lineage, certainly, Umamah has the best lineage. She was born into the best family. Her grandfather is the most honoured man. Her grandmother is Ummul Mukminin Khadijah R.Anha, who is also the best woman in this world and the hereafter. And her mother is the first daughter of the Prophet PBUH. While her father is, Abu al-As, a Meccan man known for his commendable attributes. An honest merchant. Fulfilling the rights of others. He truly loves and respects his father-in-law, Rasulullah PBUH. He would often visit his father-in-law’s house for his great love for Rasulullah PBUH. Rasulullah SAW praised him in front of his companions:
حَدَّثَنِي فَصَدَقَنِي، وَوَعَدَنِي فَأَوْفَى لِي …
“Whatever he said to me he told the truth and whatever he promised he fulfilled it for me.”
Narrated by al-Bukhari (2943) dan Muslim (2449)
Narrated from Ummul Mukminin Aisyah R.Anha, Rasulullah PBUH was once given a necklace by a woman. He said:
لَأَدْفَعَنَّهَا إِلَى أَحَبِّ أَهْلِي إِلَيَّ
“I’ll give this present to my most beloved family.”
Aisyah followed him. Rasullullah PBUH then called Umamah, Zainab’s daughter, and put it on her neck. (See al-Isti’ab fi Ma’rifati al-Ashab 4/1789). Narrated by Ahmad in his Musnad (6/101). Syeikh Syu’aib al-Arnauth stated: the sanad is dhaif.