The compound, which is also revered by Jews, is one of the biggest flashpoints in the Middle East. Israel routinely imposes age restrictions on Muslim worshippers.
“Masked rioters fled into the mosque and started to throw stones and blocks at police from inside Al-Aqsa mosque,” police said.
“They threw fireworks directly at police,” they said.
“In light of the severe confrontation and the escalating actions of the rioters and with the aim of preventing further injury to police…forces entered a number of metres (yards) inside and closed the doors to the mosque with the rioters inside, restoring order.”
Sporadic clashes continued in the lanes and alleys of the Old City surrounding the mosque, with Palestinians throwing stones and bottles, lightly wounding four policemen, police said.
An AFP journalist said police responded with stun grenades.
At least three stone-throwers were arrested.
Police reinforcements had deployed in Old City overnight for fear of unrest as thousands of observant Jews flocked to the Western Wall for an annual prayer ceremony.
There was also a demonstration at the main weekly prayers on Friday when outraged Muslims protested over insulting public comments about the prophet Mohammed made by a Jewish woman.
The police said that after their brief foray into the mosque, they withdrew and the area was quiet.
After Israeli police entered the mosque in November, Jordan — one of the very few Arab states with diplomatic relations with Israel — recalled its ambassador.
The mosque compound is the third holiest site in Islam after Mecca and Medina in Saudi Arabia.
It is the holiest site in Judaism. Jews are allowed to enter the compound, but are forbidden from praying for fear of triggering tensions with Muslim worshippers.
Police said that a young Jewish man on Sunday attempted to enter while wearing phylacteries — small leather boxes containing sacred texts worn by Orthodox men at prayer.
When told to remove them, the man resisted and grabbed hold of railings, biting a policeman who tried to remove him before he was arrested.
Israel seized east Jerusalem in the Six Day War of 1967 and later annexed it in a move never recognised by the international community.
Israel considers all of Jerusalem as its indivisible capital, but the Palestinians claim the eastern sector as capital of their promised state. -AFP