He also urged the Arab and Islamic world to support Jerusalem and the steadfastness of Palestinians.
The latest escalation began last week when three Palestinian gunmen launched an attack from there, killing two Israeli policemen at a gate to the Muslim-administered compound.
These new security measures have led to a wave of anger among Palestinians, who called for the immediate removal of the metal detectors. Authorities closed the site for both Muslim and non-Muslims worshippers as they searched for more weapons.
Metal detectors and turnstiles were installed at the holy site after a deadly shoot-out there on Friday.
Authorities chose to open only two of the 10 gates at the Old City on Sunday after security arrangements were beefed up by putting up checkpoints, metal detectors and surveillance cameras at the compound gates.
“Any restriction on Muslims entering Al-Aqsa Mosque is unacceptable”, Erdogan said, adding that “the protection of the Islamic character and sanctity of Al-Quds [Jerusalem] and Al-Haram Al-Sharif [Al-Aqsa Mosque complex] is important for the whole Muslim world”.
The Turkish leader had earlier held telephone talks with Palestinian leader Mahmud Abbas, telling him the measures imposed by Israel were “unacceptable”. “The Jews have no rights whatsoever to this mosque – it is for Muslims only”.
Conflicts over the holy site – known as the Temple Mount to Jews and Noble Sanctuary to Muslims – have repeatedly triggered Israeli-Palestinian confrontations.
“Indonesia condemns the steps undertaken by Israeli police, who are limiting access to Al-Aqsa Mosque” the statement released by the Ministry of Foreign Affairs said.
Israel seized East Jerusalem, where al-Aqsa is located, along with the rest of the West Bank and the Gaza Strip during the 1967 Middle East war. The three attackers, all Arab Israelis from Umm al-Fahm, stored the firearms used to carry out the attack within the Temple Mount compound.
The Palestinians fear Israel is trying to retake control of the site by stealth but Israeli Prime Minister Benjamin Netanyahu stressed on Friday that he had no intention of altering the status quo.
Until now, Azaria served his time in open detention on a military base in central Israel with periodic furloughs home and frequent visits from family members.