There is one man for whom Hosni Mubarak's acquittal will come as welcome relief, his friend and fellow potentate King Abdullah. Such was the Saudi King's anxiety about Mubarak that he has nudged the Egyptian military to be more active on the former dictator's behalf.

Abdullah hinted several times that aid was contingent on Mubarak's release. In August last year, just after the coup, Abdullah lobbied for Mubarak at a time when Saudi Arabia was dangling $10bn of economic relief. Mubarak was transferred from his prison cell to hospital. Latterly, there have been hints that Mubarak's release would smooth the way for an international donor's conference that the king was the first to call for.

The two men go back to the time when Abdullah was Crown Prince. Mubarak played a key role in the First Gulf War when the Arab League hesitated about backing an invasion of Kuwait. The Egyptian president not only turned the tide of Arab opinion but contributed 33,500 troops, the 4th largest commitment of coalition manpower.

Like Mubarak, Abdullah fancied himself as a reformer and he indeed came to power with high hopes. The kingdom he inherited was the world's leading oil exporter, the guardian of Islam's most sacred sites, and the centre of the Arab world. It had good relations with most of its Arab neighbours. Abdullah also took the opportunity to be his own man. In May 2001 he refused an invitation to Washington over US support for Israel during the second intifada.

Contrast this to the kingdom the aged king may soon leave behind. What will his legacy be?

Abdullah's record as a reformer is mixed. Over 70,000 students have taken him up on his offer to go to universities in the the US, Europe and Australia. One in five shura members are women. But women are still forbidden from travelling, or going to the hospital, without permission from their male guardians. A man who has locked up four of his own daughters and prevented them from moving freely for 13 years, is not about to make radical changes here.

On human rights in general, the kingdom remains one of the world's most repressive: political and human rights groups are banned; arbitrary arrest and ill-treatment in custody are commonplace; children can be tried for capital crimes if they show signs of puberty. And when they have run out of charges with which to try activists like Mohammed Saleh al-Bajadi, one of the founders of the Saudi Civil and Political Rights Association (ACPRA), they simply try them again on the same counts.

In al-Bajadi's case, the criminal conspiracy involves " participating in the founding of an unlicensed organization, harming the image of the state through the media,calling on the families of political detainees to protest and hold sit-ins, contesting the independence of the judiciary and having banned books in his possession."

Domestically, there are unmistakable rumblings of discontent. 70% of the people in one of the world's richest countries do not own their own houses. Salaries are low, and internet campaigns with the slogan " the salary is not enough" have run like wildfire in the last two years. Infrastructure is crumbling, as the inhabitants of Jeddah regularly find out when their city is flooded. The wealth of this kingdom has not trickled down.

But it is in foreign policy, that the kingdom's decline under Abdullah has been so marked. Abdullah inherited a landscape in which the kingdom had influence to the north and the south, and its historical regional rival of Iran was contained. Abdullah even had good relations with Syria, with a personal connection to the Assad clan. One of Abdullah's many wives ( the estimates vary between 27 and 70 ex wives ) is the sister-in-law of Rifaat al Assad, Bashar's uncle. When the Lebanese civil war ended , it was in the Saudi city of Taif that the agreement between the warring parties was signed. When Hamas and Fatah attempted to reconcile, they tried it first in Mecca. Abdullah's ill-fated Arab Peace Initiative is still technically on the shelf. If you had a problem in the Arab world, you would go to the Saudis to mediate the solution. They had friends everywhere

Contrast that to today. Under Abdullah's watch at least three Arab capitals have fallen under Iranian influence - Baghdad, Beirut and Damascus.

Abdullah lost Iraq to the benefit of the Iranians, when he supported the 2003 invasion. He lost influence in Lebanon in the 2006 war between Israel and Hizbollah. Both Rafiq Hariri, the prime minister who was assassinated and his son Saad had Saudi passports. And he has now lost influence in his backyard Yemen, when a UAE inspired plot to crush the Islamist Islah group backfired spectacularly, opening the door to an Iranian-backed Houthi militia. Sanaa could become the fourth arab capital Abdullah has lost.

Quite simply, he has fought the wrong wars, with the wrong allies, and left a vacuum in each one, inviting the kingdom's real enemies to enter.

Abdullah's biggest miscalculation was his reaction to the Arab Spring in 2011, which the House of Saud took personally. They were shaken by those 18 days in Tahrir Square, because they thought that they could be next. Abdullah viewed political Islam as an existential threat and vowed to fight it wherever he could.

The cost of waging this campaign has been enormous. Abdullah has lost Turkey, another vital player in the strategy to contain Iran. He has picked a fight with Qatar, threatening at one point to lay siege to the tiny Gulf enclave and almost destroyed the Gulf Cooperation Council, the core instrument of Saudi power, in the process. In trying to destroy political Islam, Abdullah now sees the resurgence of a real enemy, militant Takfiri Islam or the Islamic State.

It is not just a matter of propaganda. Abu Bakr al-Baghdadi addressed himself to the " leader of the hypocrites " when he personally threatened the king in his latest speech :"There will be no security, no rest for Al-Salul," the ISIS leader said: "Draw your swords." The black flags of the Islamic State are fluttering on the northern border of Saudi Arabia, in Iraq, to the south in Yemen and to the west in the Sinai peninsula. The suppressed shia in the volatile east of the country are alsoa force to be reckoned with. There was a outcry when Sheikh Nimr Baqir al-Nimr, who led protests in Qatif at the height of the Arab spring in 2011, was convicted of sedition.

Last, but not least, Abdullah has split his own family, by botching the succession. The crown prince Salman is in bad health and thought to be suffering from alzheimers or some form of dementia. Abdullah attempted to lock down the succession in an "unchangeable" decree which created the post of deputy crown prince for Prince Muqrin bin Abdulaziz, at 69 the youngest surviving son of King Abdulaziz. But Muqrin is also regarded as transient.

This leaves three real pretenders to the throne. There is Prince Miteb, Abdullah's own son, Mohammed Bin Nayef, the interior minister, or Ahmed bin Abdulaziz, the youngest surviving brother of the Sudairi clan. For the first time in many decades there is real uncertainty about who will be the next Saudi leader. Add it all up, and its some legacy to bequeath.

A Saudi Arabia which has failed to open up its political system, which has failed to improve the lot of its people, which has fought the wrong wars, and which has poured all its energies in trying to crush the only real antidote to Takfiri Islam, and which harbours thousands of willing carriers of the black flags of the IS, is vulnerable indeed.

- David Hearst is editor-in-chief of Middle East Eye. He was chief foreign leader writer of The Guardian, former Associate Foreign Editor, European Editor, Moscow Bureau Chief, European Correspondent, and Ireland Correspondent. He joined The Guardian, from The Scotsman, where he was education correspondent.

The views expressed in this article belong to the author and do not necessarily reflect the editorial policy of Middle East Eye.

Photo: Saudi Arabia's King Abdullah bin Abdulaziz al-Saud speaks with the US Secretary of State during a meeting at the King's desert encampment this January (AFP)