WASHINGTON — Pam Bondi, President-elect Donald Trump’s pick for attorney general, on Wednesday sought to reassure Democratic senators that her Justice Department would not prosecute anyone for political purposes but also declined to rule out the potential for investigations into adversaries of the incoming Republican president.

Her often-testy confirmation hearing centered on concerns that Trump would seek to use the Justice Department’s law enforcement powers to exact retribution against opponents, including investigators who investigated him.

Democrats pressed her on whether she could maintain the department’s independence from the White House and say no to the president if asked to do something unethical, while Republicans welcomed her as a course correction for a Justice Department they believe has pursued a liberal agenda and unfairly pursued Trump in investigations resulting in two indictments.

“What would you do if your career DOJ prosecutors came to you with a case to prosecute, grounded in the facts and law, but the White House directs you to drop the case?” asked Sen. Chris Coons, a Delaware Democrat, in one in a series of similar exchanges.

“Senator,” Bondi replied, “if I thought that would happen, I would not be sitting here today. That will not happen.”

The line of questioning laid bare what Democrats see as what’s at stake with Bondi’s appointment, particularly given the pressure that Trump wielded on his Justice Department in his first term to advance his personal interests, including demanding that the-then FBI director abandon an investigation into an ally and firing his first attorney general after his recusal from an inquiry into Trump’s 2016 campaign.

Bondi, the former attorney general of Florida and the first woman to hold that job, repeatedly stressed that she would not play politics with the Justice Department or pursue anyone for political reasons. She said she would uphold the Constitution and said the public, not Trump, would be her client.

“Of course not,” she said when asked by Republican Sen. John Kennedy of Louisiana if she would “start with a name to prosecute and then look for a crime.”

“I hope no attorney general going forward would ever do that,” she added.

But those reassurances seemed unlikely to allay Democratic concerns about her loyalty to Trump. Her testimony at times echoed Trump’s campaign rhetoric and repeatedly invoked the size of Trump’s election win in November — “Look at the map of California, Sen. Schiff. It’s bright red,” — as proof of a mandate for sweeping change. Trump did not win California.

She also made clear her allegiance to Trump by repeatedly declining to denounce some of his most incendiary stances, such as his claims that backers arrested in the Jan. 6, 2021, mob at the Capitol were “hostages” or “patriots.”

Bondi also wouldn’t directly answer when asked whether Trump lost the 2020 election to Democrat Joe Biden, only going so far initially to say that Biden is the president.

She later said she accepted the results of the election, but she also suggested there was fraud — alluding to her time as an advocate for the campaign in Pennsylvania in the days after the 2020 election.

Bondi told lawmakers she saw “many things” on the ground in Pennsylvania, adding: “We shouldn’t want there to be any issues with election integrity and our country.” She made claims of “fake ballots” and “cheating” in Pennsylvania in 2020, but there is no evidence of widespread fraud that affected the outcome of the election.

She also appeared to back up Trump’s claims that the prosecutions against him amounted to political persecution, saying the Justice Department “had been weaponized for years and years and years, and it’s got to stop.”

In a heated exchange with Sen. Adam Schiff, a California Democrat and frequent target of Trump’s ire, she stated that “every case will be done on a case-by-case basis” and said “no one should be prosecuted for political purposes” — a stance that she and other Republicans suggested was a departure from the last four years.

But when Schiff delved into specifics, asking Bondi whether she would investigate Jack Smith — the Justice Department special counsel who brought two indictments against Trump — she equivocated.

“Senator,” she said, “I haven’t seen the file. I haven’t seen the investigation. I haven’t looked at anything. It would be irresponsible of me to make a commitment regarding anything ... without looking at the file.”

The suggestion that the investigations into Trump — scheming to overturn the results of the 2020 presidential election and a separate one charging Trump with illegally hoarding classified documents at his Mar-a-Lago estate in Palm Beach, Florida — were politically motivated has been sharply contested by Attorney General Merrick Garland and by Smith.

Republicans expressed overwhelming support for Bondi and her planned agenda, which she said includes protecting gun rights, free speech and the border, and fighting violent crime and terrorism.

“If confirmed, I will work to restore confidence and integrity to the Department of Justice — and each of its components,” Bondi said. “Under my watch, the partisan weaponization of the Department of Justice will end. America must have one tier of justice for all.”