Hazrat Abdul Malik bin Rabee narrates from his father, and he from his grandfather, that the Messenger of Allah (peace and blessings be upon him) said: "Teach the child to pray at the age of seven, and at the age of ten (if he does not pray) discipline him (by beating)."