Palestinians prayed at a building in the Al-Aqsa mosque compound Friday, defying Israeli efforts to bar access to that part of the flashpoint holy site.
There have recently been scuffles between worshippers and Israeli police at the site in Israeli-annexed east Jerusalem over the use of a side building inside the holy site called the Golden Gate, closed by Israel since 2003.
Arguing there was no longer any reason for it to remain shut, officials at the site reopened the building last month and crowds of worshippers prayed inside despite the Israeli closure.
A Jerusalem court this week gave the Waqf religious organisation that administers the site until March 10 to explain why the closure order should be lifted.
The Waqf does not recognise the Israeli courts.
Azzam al-Khatib, director general of the Waqf, told AFP around 40,000 took part in the prayers Friday.
A small number entered the Golden Gate building and prayed there, AFP correspondents said.
Israeli police deployed heavily in front of all entrances to the mosque compound though the prayers passed off without major incident, the journalists said.
Khatib said the building was in desperate need of renovation.
Sheikh Abdel Azim Salhab, the leader of the Waqf council, and his assistant were briefly detained last month for what police said was violation of an order preventing entry into a prohibited area of the holy site.
They were released later the same day but the arrest drew condemnation from Jordan, which is the official custodian of the site.
Waqf spokesman Firas al-Dibs said that since the latest dispute erupted Israel had arrested nearly 130 Palestinians in Jerusalem, including senior Muslim officials.
It has temporarily barred more than 60 people from the compound, he said.
Access to Golden Gate was closed by an Israeli court order in 2003 during the second Palestinian intifada over alleged militant activity there, police say.
Waqf officials argue that the organisation that prompted the ban no longer exists.
The compound is the third-holiest site in Islam and a focus of Palestinian aspirations for statehood.
It is also the location of Judaism's most sacred spot, revered as the site of the two biblical-era Jewish temples.
Jews are allowed to visit but cannot pray there and it is a frequent scene of tension.
In 2017 tens of thousands of Palestinians prayed outside the site for several weeks in protests at Israel installing new metal detectors at the entrance to the site following a fatal attack.
It is in the walled Old City in east Jerusalem, occupied by Israel in the 1967 Six-Day War and later annexed in a move never recognised by the international community.