WASHINGTON — California and nearly two dozen other states on Friday filed suit against the Trump administration’s unprecedented legal reversal of the state’s authority to set its own rules on climate-warming tailpipe emissions.

The lawsuit represents the starting gun in a sweeping legal battle over states’ rights and climate change that is likely be resolved only once it reaches the Supreme Court. The decision could ultimately have wide-ranging repercussions affecting states’ control over their own environmental laws, the volume of pollution produced by the United States, and the future of the nation’s auto industry.

All the state attorneys general signing on to the suit are Democrats, but they represent several states that Mr. Trump won in 2016. Jurisdictions joining the lawsuit include Colorado, Illinois, Maryland, Massachusetts, Nevada, North Carolina, New Mexico, New York, Oregon, Washington, Wisconsin, Pennsylvania and Michigan, as well as the District of Columbia.

“This is the fight of a lifetime for us,” said Mary Nichols, California’s top climate change official. “I believe we will win.”