WASHINGTON — President Trump on Wednesday posted on Twitter an aggressive defense of his unprecedented move to abolish California’s legal authority to set its own standards on climate-warming automobile emissions.

Mr. Trump was in Los Angeles for a fund-raiser when he boasted about the move, which California officials and environmental advocates have assailed as an illegal attack on states’ rights and on a major policy designed to fight climate change.

“The Trump administration is revoking California’s Federal Waiver on emissions in order to produce far less expensive cars for the consumer, while at the same time making the cars substantially SAFER,” Mr. Trump wrote in the first of three posts. He said the change would lead to increased auto production and new “JOBS, JOBS JOBS,” and claimed that the newer cars would be “extremely environmentally friendly.”

California officials said they would sue to block the move as soon as the plan was officially published.