President Donald Trump attacked the state of California on two different fronts on Wednesday, both times using environmental regulations as his weapon.

First, Trump announced on Twitter that he intends to rescind a federal waiver allowing California to have more stringent automobile emissions standards, something that has been in place for decades and has changed how car manufacturers make cars nationwide.

Hours later, Trump told reporters riding with him on Air Force One that he plans to issue an environmental violation against the city of San Francisco for not doing more to address homelessness by, oddly, hitting them over the “tremendous pollution” of used needles entering the ocean — something that probably has little to no environmental impact.

The president held a long-standing grudge against California — a state where Hillary Clinton nearly doubled him up in 2016 and one in which his approval rating currently sits 30 points underwater, though usually he attacks the liberal state over things like sanctuary cities.

Trump has his reasons for each of these environmental moves against California; as we’ll get to, none of them are particularly compelling. Instead, Trump seems much more interested in retaliating against a state in which his unpopularity has dragged down the entire Republican Party, virtually eliminating the party’s California delegation in the House. And if he can use environmental regulations to do it against a state that’s proudly on the cutting edge of fighting climate change, all the better for him.

Trump’s rollback of California’s emissions standards, briefly explained

Trump framed his administration’s move to rescind California’s emissions waiver as one aimed at making cars cheaper and safer.

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. This will lead to more production because of this pricing and safety...... — Donald J. Trump (@realDonaldTrump) September 18, 2019

But there’s not a shred of evidence that less-efficient cars are safer. On the contrary, last month Consumer Reports published a “summary for policymakers” about Trump’s proposed rollback and concluded it would result in “increased oil consumption and fuel costs for consumers,” “higher vehicle ownership costs,” and “lower auto sales for automakers and dealers.”

“Further, a rollback could harm, but certainly would not improve, highway safety,” it says.

Trump, however, has made campaigning against the left’s Green New Deal — a set of policy proposals aimed at putting the US on track to net-zero carbon emissions by 2030 — a staple of his recent campaign rallies.

Speaking in New Mexico, Trump is really emphasizing gains in American energy production since he took office. He falsely claims Democrats want to abolish all oil and gas production and "annihilate New Mexico's economy." pic.twitter.com/GqdfLLZFNZ — Aaron Rupar (@atrupar) September 17, 2019

State officials in California pushed back on Trump’s announcement. During a news conference on Wednesday, Xavier Becerra, the attorney general of California, said, “Our message to those who claim to support states’ rights is, ‘Don’t trample on ours’ ... we cannot afford to backslide in our battle against climate change.”

While Trump’s move may be motivated by his idiosyncratic disdain for California, the New York Times reports that rescinding California’s emissions waiver, which has been in place in various forms since 1970, could have major national significance:

Legal experts said that if Mr. Trump’s move was ultimately upheld by the Supreme Court, it could permanently block states from regulating greenhouse gas pollution from vehicles — a major setback for efforts to control climate change. If it was struck down by the Supreme Court, it would allow states to set separate tailpipe pollution standards from those set by the federal government. That outcome could split the United States auto market, with some states adhering to stricter pollution standards than others. For automakers, that would be a nightmare.

Major automakers are united in their opposition to Trump’s move to rescind California’s waivers and indicated they may just charge ahead with making fuel-efficient cars anyway. But Trump apparently can’t pass up this opportunity to score against California.

Why Trump is trying to punish San Francisco for homelessness, briefly explained

Trump seems to view homelessness not as a humanitarian issue but an aesthetic problem for rich people. On Tuesday, he told reporters that homeless people are ruining our “best highways, our best streets, our best entrances to buildings, where people in those buildings pay tremendous taxes, where they went to those locations because of the prestige.”

Fox News has recently made portraying homeless people as something akin to vermin a major focus of its programming, and in this case as in many others, Trump’s views seem to be influenced by his favorite channel. In a July interview with Tucker Carlson, Trump seemed to fundamentally misunderstand the causes of homelessness, and on the campaign trail, Trump has made attacking California for its homelessness problem a regular part of his rally speeches.

In this single clip, Trump:

1) Says homelessness in cities "a phenomena that started 2 years ago"

2) Blames "the liberal establishment" for it

3) Claims he personally ended homelessness in DC (he didn't)

4) Says federal govt "may intercede" to "clean up" blue cities like SF & LA pic.twitter.com/E4o9mVwPud — Aaron Rupar (@atrupar) July 2, 2019

Trump’s move to issue an environmental violation against San Francisco comes from pollution purportedly stemming from homeless people not properly disposing of used needles.

“They’re in total violation — we’re going to be giving them a notice very soon,” the president told reporters aboard Air Force One on Wednesday. “They have to clean it up. We can’t have our cities going to hell.”

As anybody who has spent time in San Francisco can attest, homelessness is a real and growing issue there and in other big cities in California. The New York Times has details:

Homelessness in the San Francisco Bay Area has surged in recent years. The city of San Francisco has 8,011 homeless people, according to a count conducted this year, a 17 percent increase over 2017, the last time a count was conducted. Other nearby cities have had even larger increases, including San Jose (up 42 percent from two years ago) and Oakland (up 47 percent). In Los Angeles County, an estimated 59,000 people are homeless, about 75 percent of whom are unsheltered, according to a point-in-time count released this year.

But city officials point out that there’s no silver bullet to solving the problem and that they’re doing what they can to address it.

With regard to Trump’s claim that homeless people are polluting the water in the San Francisco Bay Area, the city’s mayor, London Breed, called it “ridiculous.”

“To be clear, San Francisco has a combined sewer system, one of the best and most effective in the country, that ensures that all debris that flow into storm drains are filtered out at the city’s wastewater treatment plants,” she said in a statement. “No debris flow out into the bay or the ocean.”

Breed announced a plan last year to open 1,000 new shelter beds by 2020 and is seeking to pass a $600 million bond to provide services and affordable housing for people at risk of homelessness. In her statement responding to Trump, Breed alluded to the bad faith involved in Trump attacking her city for not finding some sort of silver bullet.

“In San Francisco, we are focused on advancing solutions to meet the challenges on our streets, not throwing off ridiculous assertions as we board an airplane to leave the state,” she said.

This is about Trump versus California and more broadly owning liberals on their own terms

At various points during his presidency, Trump has criticized California’s immigration laws, forest management practices, and residents of the state for not being more grateful about the border fencing he’s building there — including as recently as the rally he held in New Mexico earlier this week.

Trump claims that he actually priced out the cost of moving the border wall that exists in California to New Mexico (because he's upset that Californians aren't more grateful for it), but decided not to do it because it's too expensive pic.twitter.com/qwrqRoPPsb — Aaron Rupar (@atrupar) September 17, 2019

Trump has attacked California for providing health benefits to undocumented immigrants and has made up stories about anti-immigration riots in the state that had no basis in reality. He’s threatened to cut off federal aid to the state and bizarrely taken credit for educating state policymakers about the importance that raking forests plays in preventing wildfires — his unscientific implication being that climate change doesn’t play as much of a role as commonly believed.

If you think all of this would result in Trump being unpopular in California, you’d be right. But instead of facing up to that reality, Trump has instead repeatedly pushed baseless conspiracy theories about how millions of votes illegally cast by undocumented immigrants purportedly cost him the state in 2016.

Wow. Trump alleges, without evidence, that electoral victories for Democrats in “California and numerous other states” are “rigged” because undocumented immigrants vote “many times — not just twice.” pic.twitter.com/Q5r7GbgZnH — Aaron Rupar (@atrupar) July 23, 2019

Comparing and contrasting how Trump talks about California with how he talks about states where he has more support can be an illustrative exercise. Consider, for instance, the difference between how Trump scolded California for wildfires in November 2018 with the solicitous tone he took in response to flooding in South Dakota a number of months later.

when it’s a red state vs when it’s a blue state pic.twitter.com/lSgQQ6k22E — Aaron Rupar (@atrupar) March 18, 2019

Trump doesn’t need California’s support to stay in office, therefore he doesn’t care much about it. In fact, because he’s so unpopular in the state, Trump seems to take pleasure in antagonizing Californians.

So while homelessness in Los Angeles and San Francisco is no doubt a real problem, there’s no reason to believe Trump is interested in engaging with it in good faith. Not only do the moves Trump announced on Wednesday reveal how selectively he believes in “states’ rights,” but they also say something about how Trump regards himself, consciously or otherwise, as president only for the Americans who loyally support him.

The news moves fast. To stay updated, follow Aaron Rupar on Twitter, and read more of Vox’s policy and politics coverage.