WASHINGTON — Pam Bondi was sworn in Wednesday as attorney general, taking charge of the Justice Department as it braces for upheaval with President Donald Trump aiming to exert his will over an agency that has long provoked his ire.

The ceremony took place in the Oval Office, and it was the first time that the Republican president had participated in a second-term swearing-in of a Cabinet member.

It was further evidence of Trump’s intense personal interest in the operations of the department that investigated him during his first term and then brought two since-abandoned indictments after he left office in 2021.

Bondi is expected to reshape the department, which in recent days has seen the firing of career prosecutors and FBI officials as well as the undoing of the massive prosecution into the Jan. 6, 2021, U.S. Capitol riot with Trump’s sweeping day one pardons.

The former Florida attorney general enters as the department is embroiled in a dispute with the FBI over an effort to identify thousands of agents involved the Jan. 6 investigation.

FBI agents this week sued over the Justice Department’s demand to turn over the names, which agents believe may be a precursor to mass firings. And Wednesday, acting Deputy Attorney General Emil Bove in a memo sent to the workforce accused the acting FBI director, Brian Driscoll, of “insubordination.”

Bondi is likely to be one of the most closely scrutinized members of Trump’s Cabinet, given her close relationship with Trump, who during his 2024 campaign suggested that he try to exact revenge on his perceived enemies.

Bondi has said that politics will play no role in her decision-making, but she also refused at her confirmation hearing last month to rule out potential investigations into Trump’s adversaries. She also has repeated Trump’s claims that the prosecutions against him amounted to political persecution, telling senators that the Justice Department “had been weaponized for years and years and years, and it’s got to stop.”

Before Supreme Court Justice Clarence Thomas administered the oath of office, Trump praised Bondi’s record as a prosecutor and said she will “end the weaponization of federal law enforcement.”

Bondi, who was Florida’s first female attorney general before becoming a lobbyist, told the president that she would not let him down.

“I will make you proud and I will make this country proud,” she said. “I will restore integrity to the Justice Department,” she said.

The Senate confirmed Bondi in a 54-46 vote Tuesday. The lone Democrat to join Republicans was Pennsylvania Sen. John Fetterman.

Republicans have highlighted Bondi’s record in Florida in taking on human traffickers and opioids.

GOP lawmakers said she will bring much-needed change to a department they believe unfairly pursued Trump through investigations and mistreated his supporters charged in the Jan. 6 riot.

As attorney general, Bondi will oversee the FBI, which is in turmoil over the scrutiny of agents involved in Trump-related investigations.

On Tuesday, FBI employees filed two lawsuits to halt the collection and potential dissemination of names of investigators after the acting deputy attorney general demanded the names Friday to determine whether additional personnel decisions were merited.

Bove later said in a memo to the workforce Wednesday that FBI agents “who simply followed orders and carried out their duties in an ethical manner” are not at risk of being fired. The only employees who should be concerned, Bove wrote, “are those who acted with corrupt or partisan intent.”

FBI employees who participated in investigations related to Jan. 6 were asked over the weekend to complete in-depth questionnaires about their involvement in the inquiries as the new Trump administration Justice Department weighs disciplinary actions.