LONDON — Hoping to re-energize his government and push forward into a post-Brexit, post-covid future, Prime Minister Boris Johnson reshuffled his cabinet Tuesday, demoting the man who oversaw the chaotic exit of British citizens and Afghan allies from Kabul.

Dominic Raab was sacked from the post of foreign secretary — one of the “four great offices of state” in Britain — and reassigned as justice secretary.

In Washington, that would be something akin to a shuffle from secretary of state to agriculture secretary.

Earlier this month, Raab faced criticism in Parliament over his handling of the evacuation from Kabul, with hundreds of British nationals feared to have been left behind.

Raab told the Foreign Affairs Committee that “with the benefit of hindsight,” he would not have been on vacation on the Greek island of Crete while Kabul was falling to the Taliban.

As Britain scrambled to get its people out of Kabul, Raab and British Defense Secretary Ben Wallace fought over whether the rapid unraveling of the Afghan government and the Taliban’s military victory should have been foreseen, and whose department and faulty intelligence was to blame.

The daily back-and-forth between the two got so heated that Tobias Ellwood, chair of the Defense Committee in Parliament, demanded an end to it.

“We’ve lost the passion and the art of leadership — and have caused further reputational damage in the unattractive blame game over Afghanistan that has played out so publicly,” Ellwood wrote in the Observer newspaper. “This unseemly, unprofessional squabbling must stop.”

Raab was replaced by Liz Truss, who in her previous role as trade minister struck post-Brexit deals with several countries. She has also advocated that the world get “tough with China” and has talked about pivoting trade toward Asia-Pacific nations.

In Tuesday’s shake-up, Raab was also named deputy prime minister, a title that Pippa Crerar, political editor of the Daily Mirror, said was given “to keep him happy. One Labour lawmaker joked that Raab had been “demoted and promoted at the same time.”

Deputy prime minister isn’t a standard role in Britain. The last deputy prime minister was Nick Clegg, whose Liberal Democrats were the junior members in a coalition government with David Cameron’s Conservatives.

Three ministers were let go in the cabinet shuffle, including Gavin Williamson, who was education secretary. He had been entangled in a number of scandals during the coronavirus pandemic, including over the government’s use of an algorithm to estimate exam results that appeared to favor students at private, fee-paying schools. The policy was dropped after a national outcry.

Williamson also came under heavy criticism recently when he confused England soccer star Marcus Rashford with the England rugby player Maro Itoje. Both athletes are Black.

Cabinet reshuffles are not common in Britain. They usually happen after a general election, when a government is flagging in the polls or when there have been scandals and the prime minister decides some fresh faces are the only way out.

The most brutal, arguably, was the one in 1962 by Prime Minister Harold Macmillan, who dismissed seven members — a third of his cabinet.

Until now, Johnson, who became prime minister after a landslide win in the summer of 2019, has seemed reluctant to fire ministers. He did lose his health secretary, Matt Hancock, after the married official was caught on camera in a romantic clutch with one of his top aides, in violation of social distancing rules.

Tony Travers, a political expert at the London School of Economics, said the timing of this reshuffle probably had to do with the ending of the worst of the pandemic.

He noted that, by and large, the ruling Conservatives have done well in the polls during the pandemic, helping give them a kind of “wartime emergency-powers luster.”

“But as politics as normal returns, having a more robust-looking team of ministers who are less likely to make mistakes is more necessary,” Travers said.

A recent YouGov poll for the Times of London showed backing for the Conservatives falling five points to 33 percent. The poll put the opposition Labour Party in the lead — for the first time since January — at 35 percent.

Johnson is dependent on the support of lawmakers in the House of Commons, “and the main reason they like him is he wins election and got Brexit done,” Travers said. “But there are loads of backbench MPs [members of Parliament] with modest majorities who will be wondering about those majorities. If Johnson is ahead in the polls, he’s fine. If he’s behind, it’s disaster for him. Against that backdrop, not letting Labour get too far ahead is important.”