LOS ANGELES — Girding for four years of potential battles with President-elect Donald J. Trump, Democratic leaders of the California Legislature announced Wednesday that they had hired Eric H. Holder Jr., who was attorney general under President Obama, to represent them in any legal fights against the new Republican White House.

The decision by the Legislature to retain Mr. Holder, who is now a prominent Washington lawyer, is the latest sign of the ideological battle that may play out over the next four years between this predominantly Democratic state and Washington. Hillary Clinton, the Democratic candidate for president, defeated Mr. Trump by more than four million votes here.

“Having the former attorney general of the United States brings us a lot of firepower in order to prepare to safeguard the values of the people of California,” Kevin de León, the Democratic leader of the Senate, said in an interview. “This means we are very, very serious.”

Mr. de León said he expected California to challenge Washington — and defend itself from policies instituted in Washington — on issues including the environment, immigration and criminal justice. He said California Democrats decided to turn to Mr. Holder as they watched Mr. Trump assemble his cabinet and begin to set the tone for his presidency.