It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Command children to pray at the age of seven, and strike them (for neglecting prayer) when they reach the age of thirteen."
I say that the narrator of this report, Dawud bin al-Muhabbar, is da'if (weak); however, its text has a supporting narration (shahid) in the hadith of Sayyiduna Sabrah (may Allah be pleased with him), whose wording is: "Teach the child the prayer at the age of seven, and strike him (as discipline) for it at the age of ten." Imam Abu Dawud and Imam al-Tirmidhi recorded it, and Imam al-Tirmidhi graded it sahih (authentic) in his Jami'. He also said that some of the people of knowledge act upon this, and Imam Ahmad bin Hanbal and Imam Ishaq bin Rahwayh (may Allah have mercy on them both) also say that if a boy abandons prayer after the age of ten, he must repeat it. Imam al-Tirmidhi said that in this chapter there is also a narration from Sayyiduna Abdullah bin Amr (may Allah be pleased with them both).
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب الصلاة / 775
Hadith Gradingمحدثین:إسناده ضعيف
Hadith Takhrij«قلت: داود بن المحبر ضعيف، لكن المتن له شاهد من حديث سبرة، ولفظه:» «أخرجه سنن الترمذي برقم: 407، وأخرجه سنن أبي داود برقم: 494، وأخرجه سنن الدارمي برقم: 1431، وأخرجه فتح الباري برقم: 819، وأخرجه المستدرك على الصحيحين برقم: 748، 987، وأخرجه صحيح ابن خزيمة برقم: 1002، وأخرجه المعجم الكبير للطبراني برقم: 6546، 6547، وأخرجه رياض الصالحين برقم: 327، وأخرجه شرح مشكل الآثار برقم: 2560، وأخرجه الأوسط في السنن والإجماع والاختلاف برقم: 2315، وأخرجه السنن الصغير للبيهقي برقم: 556، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 1629»