William Barr was sworn in Thursday for his second stint as the nation's attorney general, taking the helm of the Justice Department as special counsel Robert Mueller investigates Russian interference in the 2016 presidential election.

Earlier Thursday, the Senate voted 54-45 to confirm the veteran government official, mostly along party lines. Barr, who also served as attorney general from 1991 to 1993 during President George H.W. Bush's administration, succeeds Jeff Sessions. President Donald Trump pushed Sessions out of office last year after railing against his decision to recuse himself from the Russia investigation.

As the country's chief law enforcement officer, Barr will oversee the remaining work in Mueller's investigation into potential coordination between the Kremlin and the Trump campaign and decide how much Congress and the public know about its conclusion. He'll also take over a department that Trump has publicly assailed, often questioning the integrity and loyalty of those who work there.

Democrats, who largely voted against Barr, said they were concerned about his noncommittal stance on making Mueller's report public. Barr promised to be as transparent as possible but said he takes seriously the Justice Department regulations that dictate Mueller's report should be treated as confidential.

Barr's opponents also pointed to a memo he wrote to Justice officials before his nomination that criticized Mueller's investigation for the way it was presumably looking into whether Trump had obstructed justice. Barr wrote that Trump could not have obstructed justice by firing former FBI Director James Comey since it was an action the president was constitutionally entitled to take.

That view has alarmed Democrats, especially since the obstruction inquiry has been central to Mueller's investigation.

"Mr. Barr's views about the power of the president are especially troubling in light of his refusal to commit to making the special counsel's findings and the report publicly available," said California Sen. Dianne Feinstein, the top Democrat on the Judiciary panel. Feinstein said the attorney general should be "objective" and "clearly committed to protecting the interest of the people, the country and the Constitution."

Barr will be tasked with restoring some stability after almost two years of open tension between Trump and Justice officials. Trump lashed out at Sessions repeatedly before he finally pushed him out in November, and he has also publicly criticized Mueller and his staff, calling the probe a "witch hunt" and suggesting they are out to get him for political reasons. The criticism extended to Deputy Attorney General Rod Rosenstein, who appointed Mueller as special counsel. Rosenstein is expected to leave the department shortly after Barr takes office.

Trump has directed some of his strongest vitriol at department officials who were part of the decisions to start investigating his campaign's Russia ties in 2016 and to clear Democrat Hillary Clinton in an unrelated email probe that same year. Trump has repeatedly suggested that the agents and officials, many of whom have since left, were conspiring against him. In an interview aired Thursday, fired former FBI Deputy Director Andrew McCabe told CBS' "60 Minutes" that Justice Department officials discussed bringing the Cabinet together to consider using the Constitution's 25th Amendment to remove Trump from office after Comey's firing.

Trump responded to the McCabe interview with a tweet: "Disgraced FBI Acting Director Andrew McCabe pretends to be a 'poor little Angel' when in fact he was a big part of the Crooked Hillary Scandal & the Russia Hoax - a puppet for Leakin' James Comey. I.G. report on McCabe was devastating."

In his hearing last month, Barr vowed that he would not "be bullied," said Mueller's investigation is not a witch hunt and agreed that Sessions was right to recuse himself from the probe. Barr said he was a friend of Mueller's and repeatedly sought to assuage concerns that he might disturb or upend the investigation as it reaches its final stages.

When Trump nominated Barr, he called him "a terrific man" and "one of the most respected jurists in the country."

"I think he will serve with great distinction," Trump said.

Since Sessions departed last year, the position has been temporarily filled by Acting Attorney General Matthew Whitaker, who has come under fire from Democrats for his past criticism of the Mueller probe. Whitaker said last month that he believed Mueller's investigation was nearly complete — a departure for the Justice Department, which rarely comments on the state of the investigation.

Three Democrats — Sens. Doug Jones of Alabama, Joe Manchin of West Virginia and Kyrsten Sinema of Arizona — joined Republicans in voting to confirm Barr. GOP Sen. Rand Paul of Kentucky was the only Republican who voted no. He cited concerns about Barr's views on surveillance, among other issues.