Saudi Arabia, with one of the region’s largest military budgets and strongest armies, is a key part of the U.S.-led coalition attacking Islamic State targets in Syria and Iraq. Riyadh designated ISIS a terrorist organization as far back as March 2014, and in December 2015 announced its own coalition of Islamic states to fight militancy.

Still, the kingdom has come under intense scrutiny for its approach to the threat. Many of its Western allies have accused it of not doing enough to thwart the Islamic State’s funding sources or combat its ideology.

Analysts say Riyadh has been pursuing a risky dual strategy. It has supported extremist groups abroad for ideological and strategic reasons – not least to combat Shi’ite influence – while cracking down on extremists at home as a threat to the regime’s stability.

In a 2009 memo revealed by WikiLeaks, then-U.S. Secretary of State Hillary Clinton said the kingdom was a main source of funding for militant groups including Al-Qaida. Riyadh was not acting to stop this money flow, she added.

This policy continued into the Syrian civil war. Private sources in the Gulf provided hefty funding for extremist anti-regime groups in the uprising's early years, often channeling cash donations through intermediaries in Turkey.

Gulf states including Saudi Arabia allowed the transfer of funds to these militant Sunni groups, viewing the militias as an effective way to counter Iranian influence in the region.

Some groups funded this way later defected to the Islamic State, bringing their weapons with them. The Nusra Front is estimated to have lost around 3,000 fighters to its bitter rival ISIS.

Suggestions of direct funding from Riyadh seem exaggerated. The Washington Institute said in June 2014 there was “no credible evidence that the Saudi government is financially supporting ISIS.”

The report did note that “Riyadh has taken pleasure in recent ISIS-led Sunni advances against Iraq’s Shiite government, and in jihadist gains in Syria at Bashar al-Assad’s expense.”

Some Western partners fear that the civil war in neighboring Yemen, where Saudi Arabia is supporting the fight against the Iranian-allied Houthi rebels, is Riyadh’s current priority.

Open gallery view In this image released Wednesday, Sept. 24, 2014 by the official Saudi Press Agency, Saudi pilots sits in the cockpit of a fighter jet as part of U.S.-led coalition airstrikes on the Islamic State. Credit: AFP

Saudi Arabia is clearly sensitive about these issues. In December 2015 it announced it was forming a coalition of 34 Islamic countries to fight terrorism. This alliance would be based in the Saudi capital and include Arab countries such as Egypt and Qatar, and non-Arab ones such as Turkey, Pakistan and Malaysia.

Still, it remains unclear just what this grouping might achieve, not least because some ostensible members such as Indonesia expressed surprise at being included at all.

Although Riyadh did not mention the Islamic State directly, insisting that the alliance would combat terror in all its forms, it clearly hopes to reassure its Western allies that it’s part of the solution, not the problem.

Funding of the Islamic State is no longer a central issue, as the group now relies much more on profits from oil sales, extortion, theft and taxes.

Foreign countries, including in the Gulf, have clamped down on the transfer of funds. In March 2015, U.S. intelligence chief James Clapper said foreign funding sources were drying up. Private donations had dwindled to “less than one percent” of its total revenue.

But critics say it’s not only finance that links Saudi Arabia and the Islamic State. The Saudi version of Islam, Wahhabism, is based on the teachings of the 18th-century scholar Muhammad ibn Abd al-Wahhab. Militant and rigid, it harks back to an ostensibly pure version of the faith as practiced by the prophet’s original followers, the Salaf.

The Saudis have spent decades promoting this particularly conservative interpretation of Islam and sharia law around the world. They have funded mosques and free madrassas – religious schools – supplying them with imams and textbooks.

A June 2013 report by the European Parliament deemed Wahhabism the main source of global terrorism. According to the findings, Saudi Arabia had spent more than $10 million promoting the creed through charities around the Muslim world.

Although Wahhabism isn’t precisely the interpretation of Islam that the Islamic State adheres to, it shares many characteristics. ISIS leaders have referred to Abd al-Wahhab’s teachings, which help underpin the movement’s ideology. Other similarities are clear, not least hostility to Shi’ite Islam and other faith groups, as well as a rigid reading of sharia law.

Open gallery view A senior army commander talks to his soldiers at their base in southern Yemeni port city of Aden, September 28, 2015. Credit: Reuters

Much attention has been paid to the apparent crossover between Saudi Arabia and Islamic State practices, not least the Saudis’ executions by beheading.

Saudi Arabia has produced its own high-profile militant leaders including Osama bin Laden himself. It has also been linked to other instances of radicalization.

It has been suggested that the husband and wife who killed 14 people in San Bernadino, California, in December 2015 were influenced by their stay in Saudi Arabia. Syed Farook, a 28-year-old county health inspector, traveled there the previous year, while his Pakistan-born wife, 29-year-old Tashfeen Malik, spent much of her life in the kingdom.

Wahhabi Islam is also the official state religion of fabulously wealthy Qatar, which has also come under heavy pressure from world leaders to clamp down on private donations to Islamist fighters.

Qatar has joined coalition strikes against the Islamic State but also has a long record of hosting militant groups. It has let Hamas and the Taliban set up offices there and provided support to Egypt’s Muslim Brotherhood after it was unseated in 2013.

Like the Saudis, the Qataris were keen to sponsor the Syrian uprising against Bashar Assad through Islamist militias such as the Nusra Front. This had a knock-on effect on the Islamic State.

For example, there is no oversight of Qatar’s middlemen in Turkey buying weapons for antigovernment forces in Syria, and fighters from non-ISIS jihadi groups sometimes join the Islamic State and bring their weapons with them.

In August 2014, the German minister of economic cooperation and development, Gerd Müller, seemed to make an explicit link with Qatar.

“You have to ask who is arming, who is financing ISIL troops. The keyword there is Qatar, and how do we deal with these people and states politically?” he said, using an acronym for the Islamic State.

Berlin later apologized, saying these remarks were not specific allegations.

The Islamic State, for its part, remains implacably opposed to the Gulf monarchies. It has vowed to topple the Saudi regime, viewing it as a symbol of sinful decadence.

In November 2014, ISIS leader Abu Bakr al-Baghdadi reportedly called for strikes against the Saudi royal family in a speech broadcast on the group’s media. He described the regime as “the serpent’s head and the stronghold of the disease,” calling for Islamic State supporters in Saudi Arabia to rise up against the kingdom.

Saudi security services report mass arrests in anti-terrorism operations aimed at rooting out ISIS cells in the kingdom. Islamic State militants have claimed responsibility for at least four attacks on Saudi mosques in the past year, and some 2,500 Saudi nationals are believed to have traveled to fight with ISIS in Iraq and Syria.

The double game has indeed proved dangerous. While neither Qatar nor Saudi Arabia seem to have directly funded the Islamic State, their policies have helped shore up the group and directed funds and weaponry to it.