The High Court has ruled the UK Government acted unlawfully when deciding to award a contract to a company whose bosses were friends of Boris Johnsons’ former chief adviser Dominic Cummings.

Ministers have denied any favouritism was shown towards the communications agency Public First, when it was awarded a contract worth £560,000.

Campaigners took legal action against the Cabinet Office over the decision to pay more than £500,000 of taxpayers’ money to market research firm Public First, following the start of the coronavirus crisis in March 2020, and questioned the involvement of Mr Cummings.

Lawyers representing the Good Law Project said Mr Cummings, Prime Minister Boris Johnson’s then-chief adviser, wanted focus group and communications support services work to be given to a company whose bosses were his friends.

Ministers, and Mr Cummings – who left Downing Street late in 2020 – disputed the Good Law Project’s claim.

Mrs Justice O’Farrell, who is based in London, considered rival arguments at a virtual High Court hearing in February and delivered a ruling on Wednesday.

The judge said, in her ruling: “The claimant is entitled to a declaration that the decision of 5 June 2020 to award the contract to Public First gave rise to apparent bias and was unlawful.”

Jo Maugham, director of the Good Law Project, said: “This is not Government for the public good – it is Government for the good of friends of the Conservative Party.

“We just don’t understand how the Prime Minister can run a Cabinet that acts without proper regard for the law or value for public money.

“Government has claimed there was no favouritism in the awarding of contracts. But the High Court has held an informed observer would conclude otherwise.”

A spokesman for Public First said: “We’re deeply proud of the work we did in the early stages of the pandemic, which helped save lives.

“The judge rejected most of the Good Law Project’s claims, not finding actual bias in the awarding of this work, nor any problems with the pace or scale of the award.

“Rather, the judge found that weak internal processes gave rise to the appearance of bias. The judge made no criticism whatsoever of Public First anywhere in the judgment.”