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