Ex-Health Secretary Matt Hancock broke equality law by handing Tory peer Dido Harding a top health job, the High Court has found.
Two judges ruled that Mr Hancock did not comply with a public sector equality duty in relation to appointments of Conservative peer Baroness Dido Harding and Mike Coupe to posts in 2020.
Race equality thinktank the Runnymede Trust was granted the declaration by Lord Justice Singh and Mr Justice Swift after a High Court hearing in December.
The Good Law Project joined the Runnymede Trust in the action. The judges ruled that the Runnymede Trust had sufficient standing to bring a public sector equality duty challenge but GLP did not.
The ruling centred on Mr Hancock's decision to appoint Baroness Harding as interim executive chair of the National Institute for Health Protection in August 2020 and ex-Sainsbury's boss Mr Coupe as director of testing for NHS Test and Trace in September 2020.
Lawyers representing the two organisations suggested that people "outside the tight circle" in which senior Conservative politicians and their friends moved were not being given opportunities.
They said an unfair policy was being challenged.
Ministers disputed the claims made against them.
Jason Coppel QC, who led the two organisations' legal teams, told Lord Justice Singh and Mr Justice Swift that the challenge was based on equality legislation and public law.
He said the Government had a "policy or practice" of "making appointments to posts critical to the pandemic response" without adopting any, or any sufficient, "fair or open competitive processes".
Mr Coppel said people "less likely to be known or connected to decision-makers" were put at a disadvantage.
He also said the Government was failing to offer "remuneration for high-level full-time roles" and "excluding all candidates who were not already wealthy" or held other posts for which they would continue to be paid.
Lord Justice Singh and Mr Justice Swift said in a written ruling: "It is the process leading up to the two decisions which has been found by this court to be in breach of the public sector equality duty.
"For those reasons we will grant a declaration to the Runnymede Trust that the Secretary of State for Health and Social Care did not comply with the public sector equality duty in relation to the decisions how to appoint Baroness Harding as interim executive chair of the NIHP in August 2020 and Mr Coupe as director of testing for NHSTT in September 2020."
Dr Halima Begum, Chief Executive of the Runnymede Trust, welcomed the findings.
She said: “The judgement handed down today by the High Court is incredibly significant to the British people.
"It shows the importance of the Public Sector Equality Duty and its role in protecting the people of this nation from the closed shop of Government appointments, not least in a time of national crisis where people from our minority communities were dying from Covid in hugely disproportionate numbers."
Mr Hancock’s spokesman said the judgement "'the claim brought by Good Law Project fails in its entirety', therefore highlighting the fact this group continues to waste the court's time."
He said the High Court ruling “states that 'the evidence provides no support ... at all' for the allegation that Dido Harding secured senior positions on the basis of 'personal or political connections' in the Government”.
He said: "They accept these 'were urgent recruitment processes which needed to find highly specialised, experienced and available candidates within a short space of time.
"Let's not forget, we were dealing with an unprecedented global pandemic where time was of the essence in order to protect and save lives."
Mr Hancock resigned as Health Secretary last year after admitting to breaching his own Covid guidelines by kissing an aide in his office.