As recently as two years ago, Saudi Arabia’s half century-long effort to establish itself as the main power among Arab and Islamic states looked as if it was succeeding. A US State Department paper sent by former Secretary of State, Hillary Clinton, in 2014 and published by Wikileaks spoke of the Saudis and Qataris as rivals competing “to dominate the Sunni world”.

A year later in December 2015, the German foreign intelligence service BND was so worried about the growing influence of Saudi Arabia that it took the extraordinary step of producing a memo, saying that “the previous cautious diplomatic stance of older leading members of the royal family is being replaced by an impulsive policy of intervention”.

An embarrassed German government forced the BND to recant, but over the last year its fears about the destabilising impact of more aggressive Saudi policies were more than fulfilled. What it did not foresee was the speed with which Saudi Arabia would see its high ambitions defeated or frustrated on almost every front. But in the last year Saudi Arabia has seen its allies in Syrian civil war lose their last big urban centre in east Aleppo. Here, at least, Saudi intervention was indirect but in Yemen direct engagement of the vastly expensive Saudi military machine has failed to produce a victory. Instead of Iranian influence being curtailed by a more energetic Saudi policy, the exact opposite has happened. In the last OPEC meeting, the Saudis agreed to cut crude production while Iran raised output, something Riyadh had said it would always reject.

Turkey releases video of air strikes on more than 100 Isis targets in Syria after Istanbul nightclub attack

In the US, the final guarantor of the continued rule of the House of Saud, President Obama allowed himself to be quoted as complaining about the convention in Washington of treating Saudi Arabia as a friend and ally. At a popular level, there is growing hostility to Saudi Arabia reflected in the near unanimous vote in Congress to allow families of 9/11 victims to sue the Saudi government as bearing responsibility for the attack.

Under the mercurial guidance of Deputy Crown Prince and Defence Minister Prince Mohammed bin Salman, the most powerful figure in Saudi decision making, Saudi foreign policy became more militaristic and nationalistic after his 80 year old father Salman became king on 23 January 2015. Saudi military intervention in Yemen followed, as did increased Saudi assistance to a rebel alliance in Syria in which the most powerful fighting force was Jabhat al-Nusra, formerly the Syrian affiliate of al-Qaeda.

Nothing has gone well for the Saudis in Yemen and Syria. The Saudis apparently expected the Houthis to be defeated swiftly by pro-Saudi forces, but after fifteen months of bombing they and their ally, former President Saleh, still hold the capital Sanaa and northern Yemen. The prolonged bombardment of the Arab world’s poorest country by the richest has produced a humanitarian catastrophe in which at least 60 per cent of the 25 million Yemeni population do not get enough to eat or drink.

The enhanced Saudi involvement in Syria in 2015 on the side of the insurgents had similarly damaging and unexpected consequences. The Saudis had succeeded Qatar as the main Arab supporter of the Syrian insurgency in 2013 in the belief that their Syrian allies could defeat President Bashar al-Assad or lure the US into doing so for them. In the event, greater military pressure on Assad served only to make him seek more help from Russia and Iran and precipitated Russian military intervention in September 2015 which the US was not prepared to oppose.

Prince Mohammed bin Salman is being blamed inside and outside the Kingdom for impulsive misjudgments that have brought failure or stalemate. On the economic front, his Vision 2030 project whereby Saudi Arabia is to become less wholly dependent on oil revenues and more like a normal non-oil state attracted scepticism mixed with derision from the beginning. It is doubtful if there will be much change in the patronage system whereby a high proportion of oil revenues are spent on employing Saudis regardless of their qualifications or willingness to work.

Protests by Saudi Arabia’s ten million-strong foreign work force, a third of the 30 million population, because they have not been paid can be ignored or crushed by floggings and imprisonment. The security of the Saudi state is not threatened.

Aleppo before the Syrian Civil War Show all 12 1 /12 Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War A man crosses a street in Aleppo, December 12, 2009 Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War A vendor sits inside an antique shop in al-Jdeideh neighbourhood, in the Old City of Aleppo, December 12, 2009 Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War A view shows part of Aleppo's historic citadel, overlooking Aleppo city, Syria Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War A view shows part of Aleppo's historic citadel, Syria Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War Visitors walk inside Aleppo's Umayyad mosque, Syria Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War People walk inside the Khan al-Shounah market, in the Old City of Aleppo, Syria Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War A man walks past shops in al-Jdeideh neighbourhood, in the Old City of Aleppo, Syria Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War People walk along an alley in al-Jdeideh neighbourhood, in the Old City of Aleppo, Syria Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War Visitors tour Aleppo's historic citadel, Syria December 11, 2009 Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War A general view shows the Old City of Aleppo as seen from Aleppo's historic citadel, Syria December 11, 2009 Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War People walk near Aleppo's Bab al-Faraj Clock Tower, Syria October 6, 2010 Reuters Aleppo before the Syrian Civil War Aleppo before the Syrian Civil War A man stands inside Aleppo's historic citadel, overlooking Aleppo city, Syria December 11, 2009 Reuters

The danger for the rulers of Saudi Arabia, Qatar and the other Gulf states is rather that hubris and wishful thinking have tempted them to try to do things well beyond their strength. None of this is new and the Gulf oil states have been increasing their power in the Arab and Muslim worlds since the nationalist regimes in Egypt, Syria and Jordan were defeated by Israel in 1967. They found – and Saudi Arabia is now finding the same thing – that militaristic nationalism works well to foster support for rulers under pressure so long as they can promise victory, but delegitimises them when they suffered defeat.

Previously Saudi Arabia and the Gulf states had worked through allies and proxies but this restraint ended with the popular uprisings of 2011. Qatar and later Saudi Arabia shifted towards supporting regime change. Revolutions transmuted into counter-revolutions with a strong sectarian cutting edge in countries like Iraq, Syria, Yemen and Bahrain where there were Sunni and non-Sunni populations.

Critics of Saudi and Qatari policies often demonise them as cunning and effective, but their most striking characteristic is their extreme messiness and ignorance of real conditions on the ground. In 2011, Qatar believed that Assad could be quickly driven from power just like Muamar Gaddafi in Libya. When this did not happen they pumped in money and weapons willy-nilly while hoping that the US could be persuaded to intervene militarily to overthrow Assad as Nato had done in Libya.

Experts on in Syria argue about the extent to which the Saudis and the Qataris knowingly funded Islamic State and various al-Qaeda clones. The answer seems to be that they did not know, and often did not care, exactly who they were funding and that, in any case, it often came from wealthy individuals and not from the Saudi government or intelligence services.

The mechanism whereby Saudi money finances extreme jihadi groups was explained in an article by Carlotta Gall in the New York Times in December on how the Saudis had bankrolled the Taliban after their defeat in 2001. The article cites the former Taliban Finance Minister, Agha Jan Motasim, as explaining in an interview how he would travel to Saudi Arabia to raise large sums of money from private individuals which was then covertly transferred to Afghanistan. Afghan officials are quoted as saying that a recent offensive by 40,000 Taliban cost foreign donors $1 billion.