Human rights campaigners have lost a challenge against Theresa May in the high court in which she was accused of abandoning the longstanding principle that members of the government should be bound by international law.

In a hearing at the court of appeal last week, campaigners from the Gulf Centre for Human Rights (GCHR) argued that ministers had abandoned their commitment to abide by international law after rewriting the ministerial code in 2015.

The code has been in existence since 1997 and sets out the standard of conduct expected by ministers. In 2010 the code wording pointed out that there was an “overarching duty on ministers to comply with the law, including international law and treaty obligations, and to uphold the administration of justice and to protect the integrity of public life”.

In the current version of the code, that sentence has been edited to say only that there was an “overarching duty on ministers to comply with the law and to protect the integrity of public life”. Critics said changes to the code had far-reaching implications for the UK and its relationship with the rest of the world.

GCHR brought the case against May and the Cabinet Office minister David Lidington after the Guardian revealed the edits to the ministerial code.

Key issues affected by the change could include decisions about whether to go to war or use military force, about decisions made by an international court about the UK, and about any laws not incorporated into English law, such as human rights legislation and the Geneva conventions, lawyers said.

When the Guardian revealed the deletion, the Cabinet Office denied that there was any intention to weaken international law and the administration of justice by omitting the phrases.

In their judgment on Wednesday, the lord chief justice, Lord Burnett, Sir Terence Etherton, master of the rolls, and Lord Justice Hamblen found that the arguments of the human rights campaigners were “unsustainable” and that despite the change in the wording of the ministerial code, the “overarching” duty to comply with the law included international law and treaty obligations even though these words were no longer explicitly included.

Sue Willman, solicitor at Deighton Pierce Glyn, who acted for GCHR, said: “While a disappointing conclusion, this is a positive judgment from the court of appeal that now clarifies that ministers are indeed still obliged to respect international law despite David Cameron’s secret change in wording, which could have otherwise been left open to a narrow interpretation by the government.

“This is a welcome reassertion of the application of international law to central government given that the deletion was part of a package of measures intended to water down Britain’s human rights commitments in the Conservative party’s pre-election human rights manifesto.”

A Cabinet Office spokesperson said: “We welcome this decision from the court of appeal.”

