As Sunni jihadists have pushed from Syria deep into Iraq, making startling gains that are now threatening Baghdad, they are highlighting the increasingly uncomfortable position of Persian Gulf states that have backed Syria’s predominantly Sunni rebels.

Officially, Iraq’s southern neighbors, Saudi Arabia and Kuwait, oppose groups such as the Islamic State of Iraq and Syria (ISIS), which captured advanced weaponry caches and forced a dramatic retreat of government security forces across northern Iraq this week.

But citizens in Saudi Arabia and Kuwait have quietly funneled vast sums of money to and joined the ranks of ISIS and other jihadist groups fighting Bashar al-Assad’s regime in Syria over the past two years, analysts and U.S. officials have said.

The Syrian conflict, which has pitted Sunni fighters against Syrian forces and Shiite militias backed by Iran, has now more tangibly than ever spilled across regional borders, setting off the most serious crisis in Iraq since the bloodiest periods of the U.S. occupation. As a result, the gulf-sponsored jihadists — who could threaten the very integrity of the Saudi and Kuwaiti governments — are suddenly on the gulf’s back doorstep.

“While Sunni governments don’t support ISIS,” their people do, said Andrew Tabler, an expert on Arab politics at the Washington Institute for Near East policy. “The funding for ISIS, Jabhat al-Nusra and other jihadist organizations is coming from” gulf states.

Now those gulf states “are in an awkward position,” he said.

And yet gulf governments are hardly expected to come to Iraq’s aid. They have long harbored animosity toward Iraqi Prime Minister Nouri al-Maliki, a Shiite who came to power during the war in Iraq and empowered the country’s Shiite majority at the expense of Sunnis, and whom many Sunni Arabs view as a pawn of Iran.

Although Saudi Arabia and its gulf allies may fear ISIS, “they have no particular interest in shoring up Maliki’s government,” said Shadi Hamid, a Middle East expert at the Brookings Institution in Washington.

King Abdullah bin Abdul Aziz of Saudi Arabia has repeatedly refused to meet with Maliki, despite a long, shared border.

“The king has a personal attitude that this man is a puppet in the hand of the Iranians, and he dismissed him from his book a long time ago,” said Mustafa Alani, director of the National Security and Terrorism Studies Department at the Gulf Research Center.

Some — perhaps many — gulf citizens may even be cheering about the rise of the jihadists, believing them to be a positive force against Iran and its proxies in a divided Middle East, he said.

“This feeling is there,” Alani said, that ISIS may have “taught the Maliki government a lesson.”

Saudi Arabia remained silent Friday on the expanding crisis in Iraq, even as ISIS fighters advanced south toward Baghdad, and the United States pledged to send assistance to Maliki’s government. Kuwait’s defense ministry said it was “monitoring the situation and ready militarily to face any development internally or on the borders," the country’s Al-Seyassa newspaper reported.

Meanwhile, Iran’s Revolutionary Guard Corps, the country’s most powerful fighting force, also signaled its readiness to move into Iraq, deepening fears in gulf states that ISIS gains might also bring a more forceful Iranian presence to their national borders.

Hossein Salami, an Iranian Revolutionary Guard Corps general, said that his forces were “in full combat readiness” to join the fight in Iraq if necessary, the Islamic Republic News Agency reported.

Iraqi Shiite militants and Arab intelligence officials say that Iran has sent Revolutionary Guard forces to assist the Syrian and Iraqi governments in recent years. Iraqi Shiite fighters told The Washington Post last year that Iran was helping to organize and train Iraqi fighters to go to Syria and battle the Sunni-dominated rebels, including extremist jihadists such as ISIS.

Iranian President Hassan Rouhani said Friday that the Islamic republic would not “tolerate” the violence that was unfolding across the border.

With both Iran and the Obama administration saying Friday that they were prepared to assist Iraq’s beleaguered government, the Iraq crisis could spur the formation of an unusual, if temporary, alliance. That would heighten gulf fears and could worsen Saudi Arabia’s relationship with Washington, some analysts said.

In the past year, Saudi Arabia has watched with dismay as the United States sought to disentangle itself from the Middle East and moved closer to forging a deal with Iran over its contentious nuclear program.

At the same time, a rising ISIS in Iraq is no doubt worrisome for gulf nations, no matter how much their governments hate Iran.

So close to home, these jihadists “pose a direct threat” to states that are members of the Gulf Cooperation Council, which does not include Iraq, said Theorore Karasik, director of research and consultancy at the Institute for Near East and Gulf Military Analysis in Dubai.

Already, ISIS backers exist in Saudi Arabia, Karasik said. Graffiti in support of the group has appeared on walls there and its fliers are in the streets, Karasik said. The group’s relationship to al-Qaeda, particularly al-Qaeda in the Arabian Peninsula, based in Yemen, is additionally threatening.

“That puts the kingdom of Saudi Arabia in a vice grip on two different sides, and that is making the kingdom nervous,” he said.

Jason Rezaian in Tehran and Sharaf al-Hourani in Cairo contributed to this report.