The Prophet (peace and blessings be upon him) said: "Teach the child the prayer at the age of seven, and beat him for it at the age of ten."