CAIRO, Egypt — The 17-month-old popular uprising in Syria has turned into something else entirely.

The increasingly weaponized conflict, in which activists say more than 20,000 people have so far been killed, is more than ever an arena where global powers are competing for geostrategic influence.

Dozens of countries and foreign factions, all with their own agendas, are now fighting it out on the Syrian battlefield. Mostly, however, it’s the old story of Shiites versus Sunnis. And all the usual players are lining up on the usual sides.

This regional proxy war primarily pits Shiite Iran, which backs the Syrian regime, against Sunni Gulf nations, and the United States, which support the insurgency.

More from GlobalPost: Complete Coverage from Inside Syria

When the Iranian national security chief, Saeed Jalili, arrived in the Syrian capital last week, he was eager to show his support for Syrian President Bashar al-Assad.

“What is happening in Syria is not a domestic issue. But a conflict between the resistance axis,” he said, referring to Iran, Syria and their Shiite Hezbollah allies in Lebanon, “and its enemies in the region and the world.”

It’s a starkly different narrative than that proffered by Syrian rebels, of an oppressed people rising up against an authoritarian leader.

But, analysts say, it represents a decades-old pattern in the Middle East.

“As much as we’d like to think it’s about the Syrian people and their aspirations, the [conflict] is very much in lockstep with patterns of regional competition in [post-invasion] Iraq, and in Lebanon in the 1980s,” said Aram Nerguizian, visiting fellow at the Center for Strategic and International Studies in Washington, DC.

In both of those conflicts, Iran supported Shiite militias, against Israeli troops in Lebanon and Americans in Iraq.

“The politics is first Syrian, but is influenced by broader Sunni-Shiite competition [in the region],” Nerguizian said. “The patterns are evolving in a way that puts the competition ahead of finding a manageable solution.”

A six-point peace plan midwifed earlier this year by former United Nations secretary-general, Kofi Annan, failed to curb the violence as money and weapons continued to pour in.

More from GlobalPost: Syria's Wild Wild East

On the one side, the regional rivalry is led by oil-rich Sunni powers in the Gulf like Qatar and Saudi Arabia, which happen to be US allies. The governments of both countries, along with some of their wealthiest citizens, are funneling cash and light arms to the largely Sunni insurgents.

Saudi’s conservative Sunni monarchy has long been at the forefront of the charge to contain what it says is growing Iranian influence in the Gulf and the greater Middle East.

In addition to arming anti-Shiite revolutionaries in Syria, Saudi Arabia sent troops last year to quell a popular uprising in Bahrain, where the majority of the population is Shiite but the ruling monarchs are Sunni.

There was little evidence that Iran played more than a rhetorical role in the Bahraini revolt. But the Saudi government undercut US efforts to draw-up a diplomatic plan for regime reform, offering instead a column of tanks.

Now, it is arming Sunni rebels in Syria — and with less caution than the United States.

More from GlobalPost: Iran helping Syria build militia: Pentagon

“The Gulf [states] found an opportunity [in Syria] to support local forces while keeping the Iranians off balance at worst,” Nerguizian said. “Now, they are far too preoccupied with achieving maximum outcomes — and far less focused on a solution that can end the crisis.”

On the other side, Iran is providing support to the Syrian regime, which is dominated by Alawites, a minority Shiite sect.

Analysts say Iran needs the Syrian regime to maintain a key conduit for weapons to its Hezbollah allies in Lebanon, and to keep a hold on its only reliable Arab ally amid a rise in anti-Iranian sentiment in the region.

Without Assad, Iran loses a crucial pillar of support in the region — limiting its influence in the Israeli arena, and its ability to mobilize a mantle of Palestinian support.

“If Assad falls, even if there’s a managed transition where the Alawites maintain control of the security services, Iran loses its strategic alliance with Syria,” said Michael Hanna, fellow at the Century Foundation in New York.

“Syria is a central player in the Iranian power projection,” he said. “The Iranians are going to lose a lot.”

Iran, however, has a long history of adapting quickly to shifting powers in the Middle East and beyond.

“Iran will recalibrate to events in Syria,” Nerguizian said. “When you compare the Gulf States to Iran, Iran has a lot of experience in playing the regional game. The Gulf States, they’re just novices.”

The role of the United States in all this appears to be much more ambiguous. While it would no doubt like to see the overthrow of a key Iranian ally, the Obama administration is wary of involving itself too deeply in another Middle Eastern conflict.

Obama has publicly called for Assad’s isolation and ouster, while more quietly authorizing financial and “non-lethal” support for the rebels.

“I don’t know that we have a great picture” of the US role in Syria yet, Hanna said.

The CIA is reported to have people on the ground vetting those Syrian groups receiving weapons, he said. But “it’s more of an effort on US intelligence’s part to just get a handle — to map who is all involved.”

The US and Iran have much to potentially gain and lose by entering the Syrian conflict more directly.

To some US policymakers, supporting the disparate rebels — which include at least a small consortium of battle-hardened Islamic militants from Iraq and Libya — is risky.

More from GlobalPost: Damascus hotel used by United Nations bombed (VIDEO)

The sordid experience of having armed anti-Soviet rebels in Afghanistan in the 1980s, who later laid the groundwork for the birth of Al Qaeda, still haunts policymakers in Washington.

“The US would undoubtedly like to see regime change in Syria. However, it doesn’t want to get involved in an expensive, messy, full-scale military intervention,” said Rex Brynen, professor of Middle East politics at McGill University in Canada, in an email.

“It has some misgivings about some elements of the Syrian opposition, namely the small jihadist component,” he said.

But for a US administration that, along with Israel, has led the push for sanctions against Iran to delay the development of its suspected nuclear program, if backing the Syrian rebels meant overthrowing an Iranian ally — and by default destabilizing Iran — analysts say some of the unintended consequences could be worth it.