Foreign Secretary Philip Hammond has criticized a High Court judge for stripping a Saudi billionaire of his diplomatic immunity so that he can face divorce proceedings.

Hammond bluntly said the ruling “should not be upheld or endorsed” and warned it could have repercussions for British diplomats posted abroad.

The High Court dismissed as “spurious” claims from Saudi businessman Sheikh Walid Juffali that he has diplomatic immunity due to his work with the International Maritime Organization (IMO).

‘Outrageous’: Saudi diplomat who kept workers in ‘slavery’ immune from law http://t.co/ZIiQIatxUmpic.twitter.com/Rhcq9lt1pT — RT UK (@RTUKnews) February 6, 2015

Juffali is being sued for a share of his £4 billion (US$5.65 billion) fortune by his ex-wife, the former Pirelli calendar model Christina Estrada.

The couple divorced in 2014 following 13 years of marriage. Juffali began divorce proceedings in 2012 after he married Lebanese supermodel Loujain Adada in Saudi Arabia, where men can legally have up to four wives.

Juffali’s name first appeared on the London Diplomatic List as a permanent representative to the IMO for the Caribbean island of St. Lucia in September 2014, according to the Telegraph.

A November 2015 investigation by the newspaper found there was no public record of Juffali attending any meetings of the IMO and stated he possesses no known qualifications in maritime law.

Saudi executions: Cameron must rescue death row juveniles, says Reprieve https://t.co/4cGyl4q6fPpic.twitter.com/BI5DjQjZMG — RT UK (@RTUKnews) March 15, 2016

The billionaire, who chairs one of Saudi Arabia’s biggest companies, went to court to reverse a previous judicial ruling that he did not have diplomatic immunity, and was given support from the Foreign and Commonwealth Office (FCO).

A spokesperson for the FCO told RT it only intervened in one of two rulings.

“On occasion the Foreign and Commonwealth Office intervenes in cases to clarify matters of international law, in order to assist courts in the UK. In the case of Estrada v Juffali, we clarified the principles for the appointment of permanent representatives to the International Maritime Organization and the scope of the immunities that apply under international law.

“We did not intervene on the ruling that he was ineligible for immunity due to being a UK resident and the appeal court has ruled that the divorce proceedings can still be brought.”

Late Saudi king's Scientologist 'secret wife' who won millions in UK High Court speaks out https://t.co/wFpFa8B5plpic.twitter.com/knikRlbaXk — RT UK (@RTUKnews) January 23, 2016

Hammond is quoted in the Guardian as criticizing the original legal decision to strip Juffali of his diplomatic immunity.

The cabinet minister said the judge “erred in concluding that it was necessary (or permissible) for the court to ‘look behind’ the Foreign and Commonwealth Office certificate, which confirmed that [Juffali] had been appointed to the post of permanent representative of St. Lucia to the IMO and to consider whether (he) had taken up the post or exercised any functions in connection with it.”

He argued that only an executive acting through the FCO using the royal prerogative can decide who is a diplomat.

Last month, the High Court ruled the former prime minister of Qatar, Sheikh Hamad bin Jassim bin Jaber al-Thani, was protected by diplomatic immunity from a lawsuit which claims agents acting on his behalf falsely imprisoned and tortured a British citizen.

Following that ruling, junior FCO minister James Duddridge said that “it is ultimately for the court to decide whether a foreign diplomat in the UK enjoys immunity in any particular case.”