When Iran attacked Israel at the weekend, Jordan intercepted multiple missiles and drones, but King Abdullah II has stressed his country must not become "the theatre of a regional war".
If the Gaza war raging since October 7 has created tough challenges for Jordan, it now faces the additional threat of being literally stuck in the middle of a widening Israel-Iran conflict.
Jordan, about half of whose population is of Palestinian origin, is also a close US ally and signed a peace treaty with neighbouring Israel 30 years ago.
Amid the half-year-old Gaza war, Jordan's king has repeatedly voiced strong criticism of Israel and directed his military to fly daily food airdrops to help besieged Palestinians.
A strong supporter of the Palestinian cause, the monarch has described Jordan's relationship with Israel as a "cold peace".
Then, last weekend, Jordan was among a group of nations, also including the United States, Britain and France, that helped Israel shoot down missiles, rockets and attack drones launched by Iran and its allies at Israel.
Jordan stressed its aim was to safeguard its own sovereignty rather than defend Israel.
The government said its military "will confront anything that would expose the security and safety of the nation... to any danger or transgression by any party".
But this did not spare it from Iran's anger.
Iran -- which labelled its attack an act of self-defence after a deadly Israeli strike on its Syria consulate -- warned Jordan it could be "the next target", a military source was reported as saying by Iran's Fars news agency.
Jordan's foreign ministry summoned the Iranian ambassador and demanded that Tehran stop "questioning" its positions.
Ayman Safadi, head of Jordanian diplomacy, insisted that "if the danger had come from Israel, Jordan would have taken the same measures".
'A major concern'
King Abdullah, in a phone call with US President Joe Biden on Sunday, called for de-escalation and stressed that Jordan "will not be the theatre of a regional war".
In anticipation of a possible Israeli response, Jordan's army said on Tuesday it was increasing air sorties "to prevent any airspace infringement and defend the kingdom's skies".
Nimrod Goren, senior fellow at the Middle East Institute, said Jordan during the Iranian attack had "played a role that I think was larger than many expected it to play".
"It definitely shows Jordan's positioning within the US-related camp in the region, which is something that is not new, but it became very clear."
Jordan signed a peace treaty with Israel in 1994, only the second Arab country to do so after Egypt, although several others have since also established diplomatic ties.
Yet, as the Gaza war has raged, Jordan has also seen mass demonstrations in support of Palestinians since the Israel-Hamas war broke out on October 7.
Located in a volatile region, Jordan has long established strict security policies.
The mostly Sunni Muslim kingdom borders Iraq and Syria, where the regional Shiite power Iran wields significant influence.
Goren said Iran could seek "to meddle in Jordan and change the dynamics there in its favour, like it did in other countries".
Because the Iranian attack happened "above their territory", he said, it constituted a direct threat to "their defence (and) their stability".
"That's a major concern for Jordan."
Jordan's former information minister, Samih al-Maaytah, said "Jordan did not defend Israel but rather defended its sovereignty and the security of its territory".
"Jordan has nothing to do with the struggle for influence between the Persian project and the Zionist project," he told AFP.
"It does not want to get involved in a regional conflict."