A handout photograph released by the official Saudi Press Agency (SPA) shows troops from Egypt arriving for multi-national military exercise at the King Khalid Military City in Hafr Al Batin, Saudi Arabia, February 16, 2016. (Saudi Press Agency / Handout/EPA)

Saudi Arabia is flexing its muscles as pro-government forces in Syria’s civil war make sweeping advances, but concerns have mounted about its expanding military involvement in the conflict.

Syrian President Bashar al-Assad’s military, backed by ­Iranian-led militiamen and Russian airstrikes, has pressed a major offensive in the northern city of Aleppo, even as talks to broker a cease-fire have made some progress. The move threatens rebel groups that have received cash and weapons from Saudi Arabia, a Sunni powerhouse and U.S. ally that opposes Assad because of his alliance with Shiite rival Iran.

Saudi officials have responded by dispatching warplanes to Turkey, another opponent of the Syrian leader. They have said they could commit ground forces to Syria that would technically fight the Islamic State militant group but could also seemingly challenge pro-Assad forces.

Saudi leaders also have announced large-scale military exercises involving 20 mostly Arab and African nations.

“Bashar al-Assad will leave — have no doubt about it,” Saudi Foreign Minister Adel al-Jubeir recently told CNN. “He will either leave by a political process or he will be removed by force.”

[Yemen is turning into Saudi Arabia’s Vietnam]

Saudi Arabia is fighting a war in Yemen, and the prospect of the kingdom becoming entangled in another costly conflict at a time when it is facing economic troubles has unsettled many Saudis.

“Our economy is really struggling, and yet some leaders come out and say things that could get us caught up in a war in Syria against Russia,” said a prominent Saudi political observer who is close to senior officials.

He was referring to Russia’s intervention late last year in the Syrian conflict to boost Assad, its ally, a move that has changed the tide of a civil war that has killed more than 250,000 people and displaced millions.

The Saudi armed forces appear bogged down in Yemen against Iranian-aligned rebels in a drawn-out war that seems to be spilling over into the kingdom. Increasingly the rebels, known as Houthis, have been mounting assaults into southern Saudi Arabia, forcing the kingdom to deploy tens of thousands of troops to defend its border.

On the domestic front, finances are in rough shape. Slumping oil prices have forced Saudi authorities to slash public spending, freeze hiring at state-run entities and lift subsidies on energy and water.

“At all levels in Saudi society, including the royal family itself, there is serious concern about our involvement in all these foreign conflicts,” said the prominent Saudi, who spoke on the condition of anonymity because of concerns about retribution. “I think there’s a sense that we’ve lost an ability to look at things realistically.”

His concern reflects broader questions in some Saudi circles over the country’s 30-year-old defense minister and deputy crown prince, Mohammed bin Salman, the son of King Salman and second in line to the throne.

Prince Mohammed has steered the historically cautious country toward a far more aggressive — and expensive — foreign policy that aims to blunt what many in the kingdom see as unchecked Iranian expansionism in the region.

The changes include forming the mostly Sunni Arab military coalition that launched an air and ground attack last year in Yemen, as well as enhanced backing for Syria’s opposition. In December, Saudi Arabia hosted a conference to unite Syrian opposition groups ahead of peace talks that ultimately collapsed this month because

of the pro-government attacks around Aleppo.

[A mini world war rages in the fields of Aleppo]

The stakes have risen because of the fighting in Aleppo, where government forces threaten to cut supply lines from Turkey that feed a variety of rebel groups in the city and elsewhere in Syria. That could hinder Saudi Arabia’s ability to send support to fighters opposed to Assad, whom the kingdom officially insists must give up power.

“This Iranian expansionism can’t be tolerated,” said Salman al-Ansari, a Saudi analyst who lives in both the capital, Riyadh, and Washington. He described the fall of Aleppo to Syrian government forces as a possible threat to Saudi Arabia’s national security but noted that the kingdom would nevertheless refrain from any unilateral action.

Jamal Khashoggi, a Saudi journalist, described the war games and offers of deploying troops to Syria as more of a test of U.S. support for the kingdom’s policies.

The Saudi leadership fears that the Obama administration may no longer be nearly as willing to back the kingdom, especially in Syria, where the U.S. president has ruled out large-scale military involvement. Of particular concern is the U.S.-backed deal lifting sanctions on Iran in return for curbs on its nuclear program, which Saudi officials worry will embolden Iran.

“The bottom line is that Saudi Arabia is very concerned with not allowing the Iranians and Russians to win in Syria because this is a threat to Saudi national security,” Khashoggi said.

“But our options are very limited, so what you’re seeing coming from here is mostly an attempt to get our principal allies engaged again,” he said, referring to the United States.

U.S. officials have called for more Saudi involvement in the fight against the Islamic State. Although Saudi forces have participated in the U.S.-led coalition that is targeting the militant group with airstrikes in Syria, they have turned their attention to the Yemen war over the past year.

“By making these silly announcements, the Saudis have made themselves look even weaker,” said Labib Kamhawi, a Jordanian analyst. “There’s no way they can send over ground forces to Syria when they’re stuck in Yemen.”

Read more:

Today’s coverage from Post correspondents around the world