British Prime Minister Boris Johnson has appointed a new-look cabinet to revamp his government after controversies over Covid, Afghanistan and taxes, demoting his under-fire foreign minister Dominic Raab.

Mr Raab takes over as justice secretary but will retain the role of deputy prime minister, Downing Street confirmed.

The former lawyer, who deputised for Mr Johnson when he was in intensive care with Covid-19 in April last year, has faced sustained criticism for his handling of the Afghan crisis.

He was replaced by Trade Secretary Liz Truss, who has brokered a series of deals since Britain's full exit from the European Union in January.

She became only the second female foreign secretary in British history.

Among the other leading offices of state, Chancellor Rishi Sunak, who has overseen big-spending economic support during the pandemic, and hardline Home secretary Priti Patel both retained their roles. Brandon Lewis also remains Secretary of State for Northern Ireland.

"A huge privilege to continue serving as Home Secretary under our Prime Minister Boris Johnson," Ms Patel tweeted.

"There is still so much more to do to deliver for the British people. Tackling illegal migration, cutting crime and continuing to keep our great country safe."

Gaffe-prone Education Secretary Gavin Williamson was the first minister to indicate he was out of a job, tweeting that it had been a "privilege" to serve in his role since 2019 when Mr Johnson took office on a vow to "get Brexit done".

Mr Williamson was one of the ministers deemed most at risk

His message was suggestive that he was not being offered another role as a frontbencher, but there has been no confirmation of whether he would be moved to another role.

Last week, Mr Williamson caused controversy after he said he had met England footballer Marcus Rashford online when he had in fact met rugby player Maro Itoj.

Robert Jenrick and Robert Buckland were also removed from their housing and and justice roles.

Amanda Milling was ditched from her cabinet role as Conservative co-chairwoman, just a fortnight before Mr Johnson rallies the party faithful for their annual conference.

Opposition reaction

Labour said Mr Williamson had left behind a legacy of exams chaos and demoralised staff.

Shadow Education Secretary Kate Green said: "Gavin Williamson has failed children and young people, their parents and our hardworking education staff throughout one of the most testing periods in our history.

"Two years of exams chaos and staff abandoned, unsupported and demoralised. That is Gavin Williamson's legacy.

"The Prime Minister has allowed this to happen, keeping a failing Education Secretary in post for months and refusing to fight for children's futures."

Shadow Justice Secretary David Lammy has said appointing Mr Raab as Justice Secretary after being "missing in action" during the Afghanistan crisis "shows how little this Government cares about victims of crime".

"Victims need a Justice Secretary who is capable of fixing the courts crisis the government created, not one who has been open about his opposition to the fundamental rights and freedoms that the public depends on," he said.