At a time of widespread global anxiety about President Trump’s foreign policy goals, the Middle East stands almost alone in its optimism about his presidency.

The United States’ traditional Arab allies are hoping he reengages in the region after years of what they perceive as neglect by Barack Obama’s administration. U.S. rivals are hoping he becomes an ally and aligns with their interests.

But after eight years of steady disengagement by his predecessor, Trump may find his room for maneuver constrained by the expanded influence of Russia and Iran, analysts say.

“Even if Trump wants to have a more assertive policy, he will not be able to bring America back as the strongest regional player,” predicted Ibrahim Hamidi, the chief diplomatic correspondent of the pan-Arab newspaper Al-Hayat. “The Americans can’t go back to being the only super­power anymore.”

That Trump does intend to pursue a more assertive Middle East policy has been evident from some of the more consistent of his often contradictory statements, including his inauguration pledge to eradicate what he called “radical Islamic terrorism . . . from the face of the earth.”

Although the president and some of his foreign policy nominees appear to have opposing views on some issues — such as the importance of NATO and whether Russia can be trusted — they seem to agree on the need to do more to fight the Islamic State and to push back against Iran’s widening influence, making the Middle East one of the few areas on which there appears to be some level of foreign policy consensus.

[As Obama leaves the world stage: Criticism, nostalgia — and concern over his successor]

It is also one of the areas where the Obama administration’s policies have most noticeably eroded the once unchallenged U.S. role.

Russia now holds sway in Syria, has forged a close relationship with Turkey that could threaten Ankara’s ties with NATO and has been courting traditional U.S. allies such as Egypt and Saudi Arabia. Most recently, Russia has been exploring relationships in Libya, dispatching its aircraft carrier to the waters off Libya and inviting the erstwhile U.S. ally Khalifa Hifter on board for a video conference with the Russian defense minister this month.

Trump’s repeated promises to forge closer ties with Russian President Vladimir Putin could facilitate the kind of alliance in the Middle East against terrorists that the Obama administration sought but failed to achieve, said Vladimir Frolov, a columnist with the Moscow Times. But Russia would not want such an alliance to come at the expense of the role it has already carved out for itself in the region.

“The U.S. has been exiting the Middle East under Obama for a while, and with Trump talking about an America First agenda, that creates even more opportunities for Russia to fill the vacuum. We may see a situation where the U.S. actually empowers Russia to do the dirty work in the Middle East,” he said.

The constraints are most immediately apparent in Syria, where Russia has taken the lead in promoting a peace initiative that includes Turkey and Iran as co-sponsors but offers no role for the United States. Russia and Turkey have coordinated the agenda and preparatory negotiations for the talks that will begin Monday in Kazakhstan’s capital, Astana, Western diplomats say.

Turkish, Russian and Iranian officials, U.N. and European diplomats, Syrian rebels and representatives of the Syrian government arrived in Astana for the talks on Sunday. The Trump administration will not be sending a delegation, and instead the United States will be represented by its ambassador in Kazakhstan.

Russia will welcome offers of help from Trump to bomb terrorists and perhaps provide funding for reconstruction, but it doesn’t want the United States becoming involved in crafting the terms of a settlement, Frolov said.

The Syrian regime is also unlikely to want the United States playing any significant role in the country, which has a long history of fraught relations with Washington, said Salem Zahran, a Beirut-based media entrepreneur who runs media outlets in Syria and has close ties to the Syrian regime.

Trump’s statements in support of Syrian President Bashar al-Assad have come as a relief to the Syrian government, signaling an end to the Obama administration’s mantra that Assad should eventually step aside, Zahran said. But the Syrian regime is hoping mostly that the United States stays away, by halting support for the rebels, lifting sanctions and ceasing the calls for Assad to be removed.

“Trump is a businessman and if Syria were a company, he would see it as a losing company. Why would anyone invest in a losing company?” Zahran asked.

“Syria just wants Trump to be neutral,” he added. “Now that they have Russia, they don’t need America.”

[Iran nuclear deal may not survive the Trump administration]

Iran has more reason to fear the tough anti-Iranian rhetoric that has emanated both from Trump and his foreign policy nominees. But any attempt to push back against Iran would contradict the goals of allying more closely with Russia and Syria — which are, at least nominally, allied with Iran — and also run the risk of confrontation.

“Why would Iran respond to anything other than military pressure?” asked Tobias Schneider, a German analyst based in Washington. “Iran has won right now. It’s represented everywhere; it’s aligned with the winners everywhere.”

Iran has been instrumental in helping Assad survive, sending money and militias to fight on the front lines and securing in the process vast influence over the country. Last week, Tehran signed a series of contracts with Syrian government officials that included giving Iran control over Syria’s largest phosphate mine and a license to operate a mobile telecommunications network.

Since the U.S. withdrawal from Iraq in 2011, Iran has also secured its place as the most influential power in Iraq, said Ryan Crocker, a former U.S. ambassador to Iraq who is now with Texas A&M University. Reviving the U.S. role there would not be impossible, he said, but “it would be very, very difficult.”

The United States does have staunch allies. Israel is counting on Trump to fulfill his promise to move the U.S. Embassy to Jerusalem, which has made Palestinians one of the only groups vociferously opposed to his presidency. The Kurdish regions of Iraq and Syria are hoping his pledges to fight the Islamic State will translate into more military assistance for them.

[After a slow and bloody fight against ISIS, Iraqi forces pick up the pace in Mosul]

The United States also still holds important levers in the Middle East, notably its big military presence in the Persian Gulf and its economic might, neither of which Russia can match, said Anthony Cordesman of the Center for Strategic and International Studies. Arab allies such as Saudi Arabia that blame Obama for the rising power of Iran are looking forward to an administration that might more closely mirror their priorities, he said.

“The Gulf states need the United States as a counterbalance to Iran. You need to reestablish confidence that you are really going to back your allies,” he said. “This is not something that needs radical change, but it does need a steady, patient, consistent effort.”

But whether Trump is a leader who will provide patience and consistency is a concern for some in the region, Hamidi said.

“The scary thing is that to pave a way for an American role in the upcoming years needs vision and imagination,” he said. “If you don’t have this vision, you might find yourself in confrontation. Or, completely giving up and handing it all to Russia.”

Trump vows to eradicate ‘radical Islamic terrorism’

In video praising Trump, Jerusalem mayor says Obama ‘surrendered’ to radical Islam

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news