WASHINGTON (Reuters) - Democratic attorneys general in at least five U.S. states have vowed to fight President-elect Donald Trump in the courts if he rolls back Obama-era regulations or adopts policies they view as infringing upon civil liberties.

Massachusetts Attorney General Maura Healey speaks about gun violence prevention at the White House in Washington, U.S., May 24, 2016. REUTERS/James Lawler Duggan/File Photo

With Republicans controlling the White House and both chambers of Congress, the Democratic Party looks set to rely more heavily on top law officials in states they run to help keep a check on Trump’s exercise of power.

Any efforts by a Trump administration to weaken consumer protection or climate change policies, for example, could lead to conflict between the states and the federal government, attorney general offices in Maryland, Virginia, Washington, Massachusetts, and New York told Reuters. In some instances, that could see them asking a federal judge to block federal action nationwide.

“I view my role as being on the first line of defense against a Trump administration if it chooses to act in an unconstitutional fashion,” said Bob Ferguson, the Democratic attorney general of Washington state.

When George W. Bush was president, Democratic states forced his administration to take the first step toward regulating carbon emissions for the first time.

Michael Kelly, a spokesman for Virginia’s attorney general, Mark Herring, said that if a Trump administration “crosses the line and pursues actions that are illegal or violate the Constitution, Attorney General Herring will be ready to stand up and defend the rights of Virginians.”

The Trump transition team did not respond to a request seeking comment.

Attorneys general are the top legal officials in the 50 states and are typically elected. After this year’s elections, 21 will be Democrats, in addition to the attorney general for the District of Columbia.

Acting on behalf of their states, they generally have legal standing to bring lawsuits challenging federal regulations or executive actions, including those that may infringe upon civil rights.

Slideshow ( 2 images )

“The President-elect has made a number of promises that, if implemented, would violate the Constitution or Massachusetts law,” Massachusetts Attorney General Maura Healey said in a statement.

“If the incoming administration chooses to try to act in ways that are unconstitutional, my office will take action to protect the rights and liberties of our residents and our state,” she said.

SYMPATHETIC HEARING

A dozen attorney general offices contacted by Reuters declined to discuss potential legal strategies before Trump takes office.

Democratic states that sue might initially get a sympathetic hearing, as many federal courts are staffed with judges appointed by President Barack Obama during his eight years in office.

But challengers face one major obstacle, a Supreme Court likely soon to regain its conservative majority once Trump makes an appointment to fill a vacant seat. The court is currently divided 4-4 between conservatives and liberals.

Republican-controlled Texas, which took a leading role in challenging Obama’s executive actions, provides a model for the Democratic attorneys general.

Climate change is likely to be area of friction between Trump, who has vowed to roll back regulations aimed at cutting greenhouse gases, and Democratic states, which have supported such efforts at the federal level or enacted their own measures.

The top target for Trump is Obama’s Clean Power Plan, which seeks to limit carbon emissions from power plants.

Amy Spitalnick, a spokeswoman for New York Attorney General Eric Schneiderman said his office “will continue to fight to protect New Yorkers’ public health, property, and environment, and to lead the coalition of states defending the Clean Power Plan.”

Immigration policy is another potential flashpoint. Trump has said he will rescind an Obama executive order giving deportation relief to up to 4 million people and end federal funding for cities like New York and Los Angeles that give sanctuary to undocumented immigrants.

A federal court blocked the Obama executive order in February 2015 after Texas and 25 other Republican states challenged it. The Supreme Court split 4-4 on the issue in June, leaving the lower court’s ruling in place.

On consumer protection, states can both challenge any Trump efforts to loosen regulations and ramp up their own enforcement efforts, said Doug Gansler, a Democrat who served as Maryland’s attorney general from 2007 to 2015.

“If the federal government abdicates that responsibility, the more aggressive and progressive state attorneys general will fill that vacuum,” he said.