SACRAMENTO, Calif. — California and 22 other states sued Friday to stop the Trump administration from revoking the authority of the nation's most populous state to set emission standards for cars and trucks.

California Attorney General Xavier Becerra sued the National Highway Traffic Safety Administration a day after it issued a regulation designed to pre-empt the state's authority to set its own rules for how much pollution can come from cars and trucks.

Becerra, a Democrat, said two other courts have already upheld California's emission 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 law sets standards for how much pollution can come from cars and trucks. But since the 1970s, the federal government has given California permission to set its own rules because it has the most cars on the road of any state and struggles to meet air quality standards.

Drivers make their way on the US 101 freeway in Los Angeles on Aug. 30, 2019. Mario Tama / Getty Images file

The Trump administration's decision does not just affect California. Thirteen other states, plus the District of Columbia, have adopted California's emission rules for cars and trucks.

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, Wisconsin and the District of Columbia.

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

The lawsuit marks the latest battle between the federal government and California, whose Democratic leaders have prided themselves on heading a resistance to President Donald Trump and his policies, particularly those related to the environment.

"We will not let political agendas in a single state be forced upon the other 49," Transportation Secretary Elaine Chao said Thursday at a news conference in Washington.

The Trump administration has been working on setting new auto emission rules. But in July, Ford, BMW, Honda and Volkswagen announced they would voluntarily follow California's rules, bypassing the Trump administration.

The Department of Justice then launched an antitrust investigation.