JERUSALEM — Israel barred all access to a contested sacred site in the Old City for the first time in many years on Thursday, a step that a Palestinian spokesman denounced as “a declaration of war” and one that strained Israel’s crucial alliance with neighboring Jordan.

By nightfall, Israel moved to ease the simmering hostility by announcing the site, which Jews call the Temple Mount and Muslims the Noble Sanctuary, would reopen Friday morning. But the authorities said that Muslim men under 50 would be barred from prayers, as they have been frequently in recent weeks, and that Israeli police officers would be out in force. Palestinian leaders called for a mass protest.

The rare closing came after an Israeli counterterrorism unit killed a Palestinian man suspected of trying the night before to assassinate a leading agitator for increased Jewish access to the site, a cause that has fueled clashes at the site. It also followed months of rising tension and violence across the deeply divided city of Jerusalem, where Israel recently added 1,000 police officers in an effort to ward off what some experts warn could become a third Palestinian intifada, or uprising.

There is no more sensitive place in Jerusalem than the revered plateau where the ancient Jewish temples once stood — and where some extremists propose erecting a third one — and where thousands of Muslims now worship daily at Al Aksa Mosque and the Dome of the Rock.