حَدَّثَنَا عُبَيْدُ بْنُ غَنَّامٍ، ثنا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، ثنا زَيْدُ بْنُ الْحُبَابِ، ثنا عَبْدُ الْمَلِكِ بْنُ الرَّبِيعِ بْنِ سَبْرَةَ، حَدَّثَنِي أَبِي، عَنْ جَدِّي، قَالَ: قَالَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «إِذَا بَلَغَ الْغُلَامُ سَبْعَ سِنِينَ، فَمُرُوهُ بِالصَّلَاةِ، فَإِذَا بَلَغَ عَشْرًا فَاضْرِبُوهُ عَلَيْهَا»
It is narrated from Sayyiduna Sabrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When the boy reaches seven years, order him to pray, and when he reaches ten, beat him for it (for not praying)."