For nearly two months, the Justice Department has quietly rolled back several Trump-era policies and shifted positions in civil cases, moves that officials see as relatively noncontroversial returns to previous ways of doing business.

Now, with federal appeals court judge Merrick Garland set to take over as attorney general, the thornier work begins.

Garland, who is expected to be confirmed by the Senate on Wednesday, will inherit a Justice Department damaged by President Donald Trump’s efforts to use its power to benefit his friends and hurt his enemies. He’ll inherit a department overseeing several high-profile political cases, the outcomes of which probably will leave wide swaths of the country unhappy. And he’ll inherit a department that has for the past four years vigorously implemented Trump’s conservative agenda — instituting an aggressive charging policy and reviving use of the federal death penalty.

Garland, analysts say, will have to improve morale and restore the traditional barriers between his agency and the White House on criminal matters, while shepherding the department’s leftward policy shift that seemed to begin immediately after President Biden took office.

Garland said at his confirmation hearing that his first briefing would focus on the Jan. 6 riot at the U.S. Capitol and the criminal cases that have emanated from it. Prosecutors have charged more than 300 people in connection with the mayhem, authorities have said, and have been working their way up from those who entered to building to those who might have planned or orchestrated the violence that day.

Attorney General nominee Merrick Garland was a U.S. Attorney when domestic terrorists attacked the Murrah Federal Building in 1995. (Joshua Carroll/The Washington Post)

When he last worked in the Justice Department in the 1990s, Garland supervised two high-profile domestic terrorism cases: the investigation of the bombing of a federal building in Oklahoma City that killed 168 and injured hundreds more, and the investigation into the Unabomber, who carried out 16 mail bombings over 17 years. Analysts say Garland is uniquely qualified to supervise the prosecutions stemming from the Capitol riot and the department’s broader effort to crack down on domestic terrorism.

“If you become the attorney general of the United States or a U.S. attorney, there’s no time for on-the-job training. And he doesn’t have to go through on-the-job training; he’s already done it,” said Matthew Schneider, who worked as the U.S. attorney in Detroit during the Trump administration and is now in private practice at the Honigman law firm.

Some Republican lawmakers have questioned whether the department is appropriately respecting people’s civil liberties in its aggressive pursuit of rioters, and Garland could face particularly tough questions as the case grows.

The FBI has been investigating whether high-profile right-wing figures — including Roger Stone and Alex Jones — may have played a role in the attack and is considering the possibility, as some Democrats have alleged, that there may be ties between some conservative members of Congress and the rioters. Stone and Jones worked to amplify Trump’s false election fraud claims, but they have denied breaking any laws. Authorities have not accused any lawmakers of wrongdoing.

Garland also will have to take on supervision of two politically sensitive cases: special counsel John Durham’s investigation of the FBI’s 2016 probe of Trump’s presidential campaign, and Delaware U.S. Attorney David C. Weiss’s investigation into Hunter Biden, the president’s son, for possible tax crimes. At his confirmation hearing, Garland notably declined to offer a firm guarantee that he would allow either matter to reach its conclusion because he had not yet been briefed on the cases, although he said he saw no reason to believe he would shut them down.

Some Republicans said they were troubled by that response and Garland’s broader reluctance to answer their questions. Four Republicans joined the Senate Judiciary Committee’s 11 Democrats to advance Garland’s nomination, but seven opposed it. And Sen. Tom Cotton (R-Ark.) later delayed a floor vote, saying Garland did not provide substantive responses to questions about illegal immigration, the death penalty and other matters.

Nancy DePodesta, a former federal prosecutor now in private practice at the Saul Ewing ­Arnstein & Lehr firm, said Garland needs to let the Durham and Hunter Biden investigations “run their course,” and perhaps disclose more of prosecutors’ thinking than is typical for a criminal case to assure the public that the matters were handled without interference.

“You’ve got see where the evidence leads, and then be able to support or provide a basis for why charges were or were not brought,” DePodesta said. “I think transparency is important, but typically when a U.S. attorney’s office declines to charge a case that’s not something that they’re used to doing — is defending why they did not charge a case.”

But almost no matter what he does, Garland’s actions probably will leave some portion of the country unhappy if the outcome doesn’t comport with their political views, DePodesta said.

“You can’t win,” she said.

Democrats and other legal observers have complained that Republicans have taken steps to delay Garland’s confirmation, leaving the Justice Department without a Senate-confirmed leader for months into the new administration.

“You’d think with a 15-7 vote . . . that this would be a nomination so important to this nation, of an attorney general, that it would be given expedited treatment on the floor of the Senate. No,” Sen. Richard J. Durbin (D-Ill.), chairman of the Senate Judiciary Committee, said last week.

Garland will be taking office later than his recent predecessors. Trump’s first attorney general, Jeff Sessions, was confirmed on Feb. 8, 2017, and President Barack Obama’s first attorney general, Eric Holder, was confirmed on Feb. 2, 2009. But their nominations were announced earlier during the presidential transition than Garland’s was. Trump announced his plans to nominate Sessions in mid-November 2016, while Obama formally announced that he was nominating Holder on Dec. 1, 2008.

Biden did not announce Garland as his attorney general pick until Jan. 7, and Garland did not submit his questionnaire to the Senate until later that month.

In the interim, acting attorney general Monty Wilkinson, a Justice Department human resources official who previously worked as an aide to Holder, has been running the department. The administration also has installed politically appointed principal deputies to run divisions that are awaiting Senate-confirmed leaders, allowing Biden to put his stamp on policy matters across the department.

Two of those whom Biden wants to be Garland’s top deputies — deputy attorney general nominee Lisa Monaco and associate attorney general nominee Vanita Gupta — had their confirmation hearing Tuesday. Biden also has nominated lawyer Kristen Clarke to run the Civil Rights Division, although she still needs to be confirmed.

A Justice Department official noted that officials were pressing on with law enforcement and other work in the interim, citing charges against Capitol rioters, indictments against North Korean hackers and the rescinding of Trump-era guidance “not aligned with department tradition.”

Not a week into the new administration, Wilkinson withdrew Sessions’s controversial “zero-tolerance” policy for illegal-entry offenses, which led to the separations of migrant parents from their children. He also retracted Sessions’s guidance requiring prosecutors to charge the most serious, provable offenses in criminal cases, which drew criticism as being too heavy-handed, and rescinded Attorney General William P. Barr’s controversial directive giving prosecutors more leeway to pursue allegations of “vote tabulation irregularities” in certain cases before results are certified.

Analysts say that although much of the department’s work continues no matter who is in charge of the department, it’s helpful to have a Senate-confirmed attorney general and assistant attorneys general decide on the most consequential moves.

“It is easier and more efficient to reach decisions and to take positions on significant matters when the administration’s appointed official, who is politically accountable and can speak for the administration, is in place,” said Jody Hunt, who served as Sessions’s chief of staff and led the department’s Civil Division in the Trump administration. “It is not uncommon at the outset of a new administration, for example, for the Department of Justice to ask the courts for more time before taking a position on a potentially controversial litigation issue in order to afford the new administration an opportunity to assess the matter; a decision is then best made when a confirmed attorney general is in place with authority to speak for the executive [branch].”

In many areas, officials are awaiting Garland’s input.

Although Wilkinson rescinded Sessions’s criminal charging policy, he noted that his doing so was merely an “interim measure” until new Senate-confirmed leadership was in place. Garland ultimately will have to decide what policies will guide how prosecutors can file cases, possibly including restrictions on their ability to bring charges that come with severe mandatory minimum sentences.

Garland has signaled that he is open to a pause in implementing the federal death penalty, which Trump’s Justice Department had resumed, and a relaxation of the department’s pursuit of marijuana cases in states where the substance is legal. He also has suggested he favors again using court-enforced consent decrees to spur changes at local police departments, a tactic the Trump administration had all but abandoned. But policy changes in those areas probably will come with significant controversy. Many Republicans see a death penalty moratorium as the attorney general effectively declining to enforce the law, and they view the use of consent decrees as a heavy-handed tactic that impinges on local governments’ sovereignty.

Although the department’s temporary leadership has been reviewing some of Biden’s policy moves to ensure their legality, the administration has signaled it is waiting for Garland to take office before taking other steps. Asked recently about the president’s intentions on canceling student loan debt, for example, White House press secretary Jen Psaki said that, once Biden’s team was in place at the Justice Department, he would ask officials there to “conduct a legal review of his authority to act by executive action.”

“There needs to be a team at the Justice Department to make a recommendation on his legal authority,” Psaki said. “And in the meantime, if Congress moves forward and sends him a package that, you know, provides $10,000 of student debt relief, he’d be eager to sign that.”