He doesn't talk much about it in public, but one of Donald Trump's goals is to allow cars to be dirtier. From the earliest days of his administration, his Environmental Protection Agency (EPA) has been seeking to roll back emission standards put in place by Barack Obama as part of a larger attack on the Democratic president's environmental policies. Not only did Trump want to strike down federal rules requiring new cars to get around 54 miles a gallon by 2025, his administration attempted to revoke California's ability to set its own rules on auto pollution, inspiring a wave of bipartisan opposition and lawsuits from California and other states.

On Thursday, that saga appeared to come to an abrupt end as major car manufacturers reached an arrangement with California to abide by the state's standards, handing Trump a defeat at the hands of an odd alliance of big corporations and blue state lawmakers.

It's rare for an industry to want more government regulation, and early in the Trump administration car manufacturers did want Trump to scale back those pesky emission standards. But the EPA's subsequent moves led to a situation where California would be holding to its regulations during a long legal battle while other parts of the U.S. adopted a different standard on emissions. That kind of fragmentation and uncertainty is exactly what car makers didn't want, and they said so in a letter to the administration in June.

California might have ultimately beaten Trump in the courts, and has the additional leverage of being the largest car market in the country. Traditionally, California’s Air Resources Board has had about as much power as any federal agency when it comes to forcing car manufacturers to comply with rules. So it's not surprising that the major companies that struck the deal with the state agreed to a standard of around 51 miles per gallon by 2026. But getting outmaneuvered by California liberals can't feel good for Trump.

Follow Harry Cheadle on Twitter.