SACRAMENTO, Calif. — California sued Friday to stop the Trump administration from revoking its authority to set greenhouse gas emission and fuel economy standards for cars and trucks, enlisting help from 22 other states in a battle that will shape a key component of the nation's climate policy.

Federal law sets standards for how much pollution can come from cars and trucks. But since the 1970s, California has been permitted to set tougher rules because it has the most cars and struggles to meet air quality standards. On Thursday, the National Highway Traffic Safety Administration withdrew California's waiver.

The NHTSA action does not take effect for 60 days, but state leaders did not wait to file a lawsuit. Democratic Gov. Gavin Newsom, who has clashed with President Donald Trump on several fronts, vowed the state "will hold the line in court to defend our children's health, save consumers money at the pump and protect our environment."

The Trump administration's decision does not just affect California. Thirteen other states, plus the District of Columbia, have adopted California's standards.

A spokesman for the National Highway Traffic Safety Administration declined to comment on the lawsuit. But Thursday, Transportation Secretary Elaine Chao said the rules "were making cars more expensive and impeding safety because consumers were being priced out of newer, safer vehicles."

"We will not let political agendas in a single state be forced upon the other 49," Chao said.

The National Highway Traffic Safety Administration said its authority to set nationwide fuel economy standards pre-empts state and local programs.

California Attorney General Xavier Becerra cited a 2007 U.S. Supreme Court decision that rejected the NTSB's argument that greenhouse gas emission standards under the Clean Air Act interfered with its ability to set fuel economy standards.

"The Oval Office is really not a place for on-the-job training. President Trump should have at least read the instruction manual he inherited when he assumed the Presidency, in particular the chapter on respecting the Rule of Law," Becerra said in a statement.

Federal regulators said the regulation would not impact California's programs to address "harmful smog-forming vehicle emissions."

Joining California in the lawsuit are attorneys general from Colorado, Connecticut, Delaware, Hawaii, Illinois, Maine, Massachusetts, Maryland, Michigan, Minnesota, Nevada, New Jersey, New Mexico, New York, North Carolina, Oregon, Pennsylvania, Rhode Island, Vermont, Virginia, Washington and Wisconsin.

Hawaii Attorney General Clare Connors issued a statement Friday on the challenge.

“The NHTSA does not have the authority to preempt California’s standards related to vehicle emissions and pollutants,” said Attorney General Connors. “This attack on California’s efforts hurts every state that is trying to protect its communities from pollution and environmental harm.”

The cities of New York and Los Angeles and the District of Columbia also joined the lawsuit.