CAIRO — Egypt faces high expectations from Saudi Arabia and its other Gulf Arab benefactors that it will have their back as tensions rise with their rival Iran, including throwing the weight of its military — the largest standing Arab army — into the crisis if needed.

But Egypt clearly has no desire to be dragged into a military conflict or to see the tensions spiral into another Saudi-Iran proxy battle like the many that are already tearing up the Middle East.

Its reluctance could lead to frictions between Cairo and Riyadh.

Egypt’s leadership has been striking a balancing act, giving nods of support to its Gulf allies while trying to defuse their escalations against Iran.

Last week, President Abdel-Fattah el-Sissi proclaimed that any threat to Gulf security “is a threat to our own national security,” warning Iran to stop meddling. But he also said the region “has enough instability and challenges as it is” and doesn’t need a crisis with Iran or Hezbollah, and he called for dialogue to resolve tensions.

Other Egyptian officials sharpened their rhetoric against non-Arab, Shiite Iran, but have not embraced the sectarian or ethnic slant used by their Sunni-led Gulf friends.

In the past month, Saudi Arabia has twice accused Iran and its Lebanese ally Hezbollah of acts of war against it. A direct war between the two regional powerhouses still seems unlikely; but the heightened rhetoric raised fears that it wasn’t out of the question or that a new proxy fight could erupt in Lebanon.

Egyptian commentators have bluntly warned against getting mired into a military conflict initiated by the Saudis.

“Egypt’s real national duty is to tell our brothers … that we are with them to defend the security of Saudi Arabia, the Gulf and the entire region … But that does not mean that we get dragged by them into wars and conflicts that are essentially sectarian and benefit no one except the enemies of the (Arab) nation,” the editor of the newspaper Al-Shorouk, Imad Hussein, wrote this week.

Hussein, who is close to the government, made sure to praise Saudi Arabia’s regional role, its financial support for Egypt and its custodianship of Islam’s holiest shrines. He also avoided naming Saudi Crown Prince Mohammed bin Salman, the heir to the throne behind the kingdom’s more hawkish anti-Iran stance. He has driven aggressive regional policies, including military intervention in Yemen and the ostracizing of Qatar — a move that Egypt fell in line with.

Another prominent commentator, veteran opposition figure Mohammed Aboul-Ghar, counselled the government to stay out of any potential Saudi-Iran conflict, arguing that Egypt’s army was needed to fight an insurgency by Islamic militants and protect the porous borders.

“Coming close to that dangerous (Gulf) region is a horrifying prospect. It’s neither wise nor sound to even talk about that,” he wrote in Tuesday’s edition of the Cairo daily Al-Masry Al-Youm.

Saudi Arabia has bolstered el-Sissi with massive financial backing as the general-turned-president struggles to overhaul Egypt’s dilapidated economy. The kingdom is estimated to have given Egypt more than $10 billion in grants and soft loans since 2013 in addition to numerous free shipments of fuel worth tens of millions of dollars.

Still, Egypt has been willing to resist Saudi demands. In 2015, it came under heavy Saudi and Gulf pressure to send ground troops to fight alongside a Saudi-led coalition against Iranian-backed Shiite rebels in Yemen.

Instead, Egypt restricted its involvement to deploying warships and aircraft on patrol and reconnaissance missions in the southern reaches of the Red Sea. Egypt has bad memories from its intervention Yemen’s civil war in the 1960s, when it backed republicans against a Saudi-backed monarchy in an ill-fated and costly military adventure.

Egypt has also stayed out of Riyadh’s campaign to oust President Bashar Assad, supported Russia’s military intervention there on Assad’s side and negotiated local cease-fires between the government and rebels.

Those differences angered Riyadh, prompting a temporary suspension of aid to Egypt earlier this year.

In the end, Saudi Arabia “did not get the foreign policy changes it wanted (from Egypt) in return for its generous support,” said Eric Trager of the Washington Institute for Near East Policy.

“The Saudis have learned to live with limited Egyptian involvement in Yemen,” he added.

The Saudis and Egypt have somewhat patched up the ill-feelings. Now Cairo wants to avoid a new falling-out over Iran.

Tension has been running high between Saudi Arabia and Iran. The kingdom charged that a missile fired by Yemeni rebels toward Riyadh this month could be considered “an act of war” by Iran, which it accused of providing the missile.

Things further heated up when Lebanon’s prime minister, Saad Hariri, resigned in a pre-recorded message aired from Saudi Arabia, blaming Hezbollah. Riyadh swiftly criticized Hezbollah, saying its aggressions could be considered a “declaration of war.”

Still, Egypt seems determined to avert any slide toward armed conflict.

El-Sissi dispatched his foreign minister to Saudi Arabia, the United Arab Emirates, Kuwait and Bahrain. In Riyadh, the minister met with the Saudi crown prince and, it appears, counselled backing off an escalation with Iran.

“The foreign minister was at pains to convey Egypt’s concern to see the region spared any tensions that would deepen the instability and polarization it’s already seeing,” the minister’s spokesman Ahmed Abu Zeid said of the Tuesday meeting.

Egypt’s track record under el-Sissi shows his reluctance toward military action unless its own territory is directly threatened or if the Gulf is subjected to a clear-cut aggression.

“Egypt adopts a deeply entrenched position against military solutions,” presidential spokesman Bassam Rady said in published comments this week.

Michael W. Hanna, a Mideast expert at the Century Foundation in New York, said Egypt does have concerns “about what the Iranians are doing in Syria and Yemen.”

“But Iran is not a high-level priority for Egypt. It does not worry about Iran the same way the Saudis do.”