Work began on Wednesday to take apart a controversial bridge leading to the Temple Mount in Jerusalem before anger over the structure could cause a diplomatic rift with Jordan, Israeli officials said.

The wooden bridge, alongside the existing Mughrabi Bridge, was intended to provide access for non-Muslim visitors to the Temple Mount from close to the Western Wall plaza, the Hebrew daily Haaretz reported.

Erected less than two weeks ago, the bridge had not officially been opened when Prime Minister Benjamin Netanyahu ordered it be dismantled after it became clear that the project was not approved by the relevant authorities, and amid mounting Jordanian protests.

According to Haaretz, the Western Wall Heritage Foundation had ordered the construction work.

A senior official in the Prime Minister’s Office explained to The Times of Israel on Wednesday that, due to its sensitivity, the whole Temple Mount and surrounding area is under the direct authority of the PMO.

“There was a structure built without proper authority; there is no real need for this structure,” the official said. “When the Jordanians approached us [with the request to take it down], we of course agreed. There was no objective reason to have it there in first place. Everyone understands the sensitivity of the area and there’s no logical reason to add extra sources of friction.”

The day-to-day administration of Temple Mount is carried out by the Jordan-based Wakf. Jordanian officials were annoyed that the bridge was set up without consultation and made it clear, via various diplomatic channels, that the Jordanian royal household was particularly concerned with the developments, Haaretz reported.

News of the about-face over the bridge came on the same day as Israel closed a $15 billion deal with Jordan to supply the Hashemite Kingdom with natural gas. However, the government official said that the gas contract did not influence Netanyahu’s actions over the bridge.

“The decision was taken on its own merit,” the official said. “The peace treaty with Jordan, which we we honor and respect, gives Jordanians a status on the Muslim holy sites.”

Access to the Temple Mount via the Mughrabi gate has been a sensitive issue since an original earth ramp from the Western Wall plaza to the gate used by non-Muslim visitors collapsed after a snowstorm in 2004.

Three years later Israel constructed what was planned to be a temporary wooden bridge until a more permanent stone structure could be set up. However, news of the planned stone bridge caused outrage across the Arab world amid allegations that it was a ploy for Israel to gain more control over the Temple Mount itself. As calls for a third intifada grew, along with violent protests and vigorous objections from Jordan, the plan was abandoned and the wooden bridge, which became known as the Mughrabi Bridge, was reinforced to provide long-term access.