(Adds details, background)
WASHINGTON, Oct 30 (Reuters) - U.S. President Donald Trump on Wednesday thanked General Motors Co, Toyota Motor Corp and Fiat Chrysler Automobiles NV for "standing with" his efforts to bar California from setting its own fuel efficiency rules for cars and trucks.
"California has treated the Auto Industry very poorly for many years, harming Workers and Consumers," Trump wrote on Twitter.
The automakers' decision to side with the Trump administration follows legal challenges by California and 22 states and environmental groups in September.
Those challenges aim to undo the administration's determination that federal law bars California from setting its own stiff tailpipe emission standards and zero-emission vehicle mandates.
The decision to back Trump, disclosed in a filing with a U.S. appeals court late on Monday, could prompt a furious backlash from Democrats and environmentalists.
It also poses a risk for the automakers if a Democrat wins the White House in next year's election and reverses Trump’s actions, and also reinstates California’s right to set its own rules and tougher national emissions standards adopted under former President Barack Obama. (Reporting by Tim Ahmann, Editing by Franklin Paul and Tom Brown)