RAMALLAH, West Bank — King Abdullah II of Jordan made the short trip to Ramallah on Monday for a highly symbolic visit with President Mahmoud Abbas of the Palestinian Authority, against the backdrop of the recent crisis over the Aqsa Mosque in East Jerusalem and tensions with Israel.

Arriving by helicopter, the king was greeted by a Palestinian honor guard, as well as by a huge poster of his image and that of Mr. Abbas superimposed on crowds of Muslim worshipers inside the Aqsa compound. It bore the legend, “Jerusalem will triumph.”

But as much as the king’s visit — his first in Ramallah in five years — was intended as a show of solidarity and close coordination with the Palestinians, Palestinian officials acknowledged that it was probably equally aimed at the Jordanian public, and its reaction to the fatal shooting by an Israeli Embassy guard in Amman of two Jordanians, a teenager who apparently attacked him with a screwdriver and an innocent bystander.

Jordan, the custodian of the Aqsa shrine in Jerusalem, helped resolved the crisis involving the mosque, set off when Israel placed metal detectors, cameras and other security measures at entrances to the compound. Those measures came in response to a deadly July 14 attack, when three armed Arab citizens of Israel emerged from the mosque and fatally shot two Israeli police officers.

In a rare move after the attack, Israel temporarily closed the contested and volatile holy site, which is revered by Jews as the Temple Mount and by Muslims as the Noble Sanctuary.

After days of bloodshed and a two-week stand off in which Palestinian Muslims refused to enter the compound, Israel removed the metal detectors and other equipment. The separate tension between Israel and Jordan over the embassy guard incident injected a sense of urgency into resolving the issue.

Image

Jordan’s King Abdullah II departs in a helicopter after meeting with Palestinian President Mahmoud Abbas.CreditNasser Nasser/Associated Press

Israel’s relations with Jordan were further strained when Prime Minister Benjamin Netanyahu gave the embassy guard a hero’s welcome on his return to Israel. The prime minister’s office distributed video showing him embracing the guard, fueling outrage in Jordan. King Abdullah castigated Mr. Netanyahu, saying he had exploited the episode for “personal political gains” and said relations between the countries — former enemies who signed a peace treaty in 1994 — would depend on how Israel handled the affair.

Israel and Jordan maintain a crucial regional alliance but the peace between the two governments has not filtered down to the Jordanian people, many of whom are of Palestinian origin.

Jordan has said that the Israeli ambassador and the rest of the embassy staff, who all returned to Israel, will not be allowed back to Amman until the shooting episode has been properly investigated. Israel announced on Friday that the Israeli police was conducting an examination that would be monitored by the state attorney’s office.

The king’s visit to Ramallah would have had to be coordinated with the Israeli authorities, since Israel controls the air space above the West Bank. The king spent barely two hours on the ground meeting with Mr. Abbas and other officials.

Saeb Erekat, the secretary general of the Palestine Liberation Organization, said in a statement that the king’s visit was “a message of support and succor for President Abbas and the Palestinian people.”

During his visit, King Abdullah emphasized Jordan’s support for the establishment of a Palestinian state with East Jerusalem as its capital, and the importance of working with the Trump administration to restart the peace process, according to Petra, the official Jordanian news agency. It added that the Jordanian and Palestinian leaders also discussed the need to maintain the status quo at the Aqsa compound.

“The king came to Ramallah because Jerusalem is occupied,” said the Grand Mufti of Jerusalem, Muhammad Ahmad Hussein, one of several Palestinian religious and political leaders who came to the presidential headquarters to welcome King Abdullah.

Israel captured the West Bank and East Jerusalem from Jordan in the 1967 war. While the West Bank remains under Israeli occupation overall, the Palestinian Authority holds sway over parts of it. Israel annexed East Jerusalem in a move that was never recognized internationally, and the country claims sovereignty there.

A version of this article appears in print on , on Page A8 of the New York edition with the headline: King of Jordan Meets With Palestinian Leader. Order Reprints | Today’s Paper | Subscribe

Sign up for The Interpreter

Subscribe for original insights, commentary and discussions on the major news stories of the week, from columnists Max Fisher and Amanda Taub.