Praise be to Allah.
Abu Dawood (459) and Ahmad (6650) narrated from ‘Amr ibn Shu’ayb from his father that his grandfather said: The Messenger of Allaah (blessings and peace of Allaah be upon him) said: “Teach your children to pray when they are seven years old, and smack them (lightly) if they do not pray when they are 10 years old, and separate them in their beds.” Classed as saheeh by al-Albaani in al-Irwa’ (247).
Ibn Qudaamah (may Allaah have mercy upon him) said in al-Mughni (1/357):
This telling and discipline is prescribed in the case of children in order to train them to pray, so that they will be used to it and it will become their habit, and they will not forsake it when they reach puberty. End quote.
The guardian must tell the child to pray when he is seven years old and smack him (lightly) if he does not do so when he is ten.
We think we should enjoin what is not obligatory and smack for failing to do that which is not obligatory. We smack animals for disciplinary purposes, so what about children? That is in the child's interests, and so that he will get used to praying before he reaches puberty. End quote.
Fataawa al-Subki, 1/379
So boys and girls are to be told to pray when they are seven years old and are to be smacked (lightly) if they do not pray when they reach the age of ten. Similarly they are to be told to fast Ramadan and should be encouraged to do good things, such as reading Qur’aan, offering supererogatory prayers, Hajj and ‘umrah, and reciting a lot of tasbeeh, tahleel, takbeer and tahmeed, and they should be prevented from committing all kinds of sin.
With regard to smacking a child for not praying, it is stipulated that the smacking should be light and should not be painful and should not break the skin, or break a tooth or bone. It should be on the back or the hand and the like, and the face is to be avoided because it is forbidden to strike it, because the Prophet (blessings and peace of Allaah be upon him) forbade that.
It should not be more than ten blows, and it should be done for the purpose of discipline and teaching. So he (the parent etc) should not show his desire to punish, except when there is a need to show that, such as if the child is turning away from prayer and forsaking it, and the like.
It was narrated from Abu Bardah al-Ansari that he heard the Messenger of Allaah (blessings and peace of Allaah be upon him) say: No one should be given more than ten lashes except in the case of one of the hadd punishments of Allaah.” narrated by Al Bukhaari (6456) and Muslim (3222).
Ibn al-Qayyim (may Allaah have mercy upon him) said:
The words of the Prophet, “No one should be given more than ten lashes except in the case of one of the hadd punishments of Allaah,” referred to an offence or criminal act, which has to do with what Allaah has prescribed as a punishment.
If it is said: What do we mean by ten or less?
The answer is: This has to do with when a man hits his wife, his slave, his child, or his hired worker for the purpose of discipline and the like: it is not permissible for him to give more than ten blows. This is the best way to understand the hadeeth. End quote.
I’laam al-Muwaqqi’een (2/23)
It should also not be done in front of anyone else, so as to protect the child's self-esteem and his dignity in front of his friends and others.
It should be known from the father's behaviour with his children and his disciplining of them that he does not smack anybody whom he smacks except in obedience to Allaah and to his Messenger (blessings and peace of Allaah be upon him), and that the only reason he does that is the child's best interests, and his keenness to raise him in the prescribed manner, so that the child will not .grow up hating Islamic teachings which he may find difficult, and that he was smacked for not doing them.
Shaykh Ibn Baaz (may Allaah have mercy on him) said:
Take care of the members of your household and do not neglect them, O slave of Allaah. You have to strive hard in their best interests, and tell your sons and daughters to pray at the age of seven, and smack them (lightly) if they do not do so when they are ten, a light smack that will help them to obey Allaah and make them get used to offering prayers on time, so that they will adhere properly to the religion of Allaah and know the truth, as is narrated in saheeh reports from the Messenger of Allaah (blessings and peace of Allaah be upon him). End quote.
Majmoo’ Fataawa Ibn Baaz (6/46).
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said:
The Prophet (blessings and peace of Allaah be upon him) commanded us to tell our children to pray when they are seven years old, and to smack them (lightly) if they do not pray when they are ten years old, even though they are not obliged to do that yet, so that they may be trained in doing acts of worship and obedience and may get used to them, so that it will be easy for them to do that after they grow up and it will be dear to them. The same applies to all matters that are blameworthy; young children should not get used to them even though they are not yet under any obligation, because otherwise they will get used to them when they grow up and will enjoy indulging in them. End quote.
Fataawa Noor ‘ala al-Darb, 11/386
The command implies that it is obligatory, but it is limited only to cases where smacking will be beneficial, because sometimes you smack a child but he does not benefit from being smacked, it only makes him scream and cry more and does not serve any benefit. Moreover what is meant by smacking here is smacking that is not painful, a light smack that serves the purpose and does not cause any harm. End quote.
Liqa’ al-Baab il-Maftooh, 95/18
He (may Allaah have mercy on him) also said:
It should not be a smack that causes injury, and it should not be a smack in the face for example, or a smack to a lethal site; rather he should be smacked on the shoulder or the hand and the like, which would not cause him to die. Smacking on the face is risky, because the face is the highest and noblest part of a person and if a person is smacked on the face it is more humiliating and shameful than if he were to be smacked on the back. Hence it is forbidden to smack on the face. End quote
Fataawa Noor ‘ala al-Darb, 13/2
Shaykh al-Fawzaan said:
Smacking (lightly) is one of the means of child rearing. The teacher may smack, the trainer may smack, the guardian may smack for disciplinary purposes; and the husband may smack his wife in cases of wilful defiance (nushooz).
But that must be within certain limits, and it should not be a blow that causes pain, breaks the skin or breaks the bone; rather it should be only as much as is necessary. End quote.
Ighaathat al-Mustafeed bi Sharh Kitaab al-Tawheed (282 -- 284)
It should also be noted that disciplining a child should not be done only for neglecting to pray; rather it should also be done if he is careless about the conditions, essential parts and obligatory duties of prayer. A child may pray, but he combines prayers, or he prays without wudoo’, or he does not pray properly. So he must be taught everything about it, and we should make sure that he is aware of its obligatory duties, essential parts and conditions, then if he neglects any of these things, we must advise him and teach him time after time, then if he persists he may be disciplined by means of smacking until he prays properly.
And Allaah knows best.