Former President Donald Trump has promised, if he is reelected, to do away with Biden administration policies that encourage the use and production of electric cars. Yet one of his biggest supporters is Elon Musk, the CEO of Tesla, which makes nearly half the electric vehicles sold in the United States.

Whether or not Trump would carry out his threats against battery-powered cars and trucks, a second Trump administration could still be good for Tesla and Musk, auto and political experts say.

Musk has spent more than $75 million to support the Trump campaign and is running a get-out-the-vote effort on the former president’s behalf in Pennsylvania. That will almost surely earn Musk the kind of access he would need to promote Tesla.

But Musk would also have to confront a big gap between his Washington wish list and Trump’s agenda.

While Musk rarely acknowledges it, Tesla has collected billions of dollars from programs championed by Democrats like President Joe Biden that Trump and other Republicans have vowed to dismantle.

In Michigan, a swing state and home to many auto factories, the Trump campaign has run ads that claim that Vice President Kamala Harris, the Democratic presidential nominee, wants to “end all gas-powered cars” — a position that she does not hold.

During Trump’s term as president, “one of the first things he did in office was to attempt to roll back vehicle pollution standards and attack clean cars and Obama-era regulations,” said Katherine Garcia, director of the Clean Transportation for All Campaign at the Sierra Club.

In theory, Musk could act as a brake on Republican efforts to eliminate programs that promote electric cars. But his political capital would be finite, and he might use his influence to ease regulatory scrutiny of Tesla self-driving technology or to preserve clean air credits that have added billions of dollars to Tesla’s bottom line.

Musk would also have to decide whether to put the priority on Tesla or on his other businesses, like SpaceX, which the federal government depends on for rocket launches. The list of Musk’s business interests that interlock with government is long.

“He wouldn’t be throwing his weight behind Trump if he didn’t think there was a benefit to him and his companies,” said Will Rhind, CEO of GraniteShares, an investment firm with funds focused on Tesla.

Tesla did not respond to requests for comment. The Trump campaign cited a recent interview in which Trump acknowledged that he and Musk disagreed “a little bit on the electric car.” The former president said he would terminate “on the first day” what he called electric car mandates. He added, “We want electric cars, but we want, really, to have all cars.”

Musk has staked Tesla’s future on technology that he says will allow his cars to drive without human intervention.

The National Highway Traffic Safety Administration said this month that it was investigating whether a Tesla system that the company calls “full self-driving (supervised)” was responsible for four collisions, including one that killed a pedestrian.

Musk could be expected to use his pull in the White House to try to get federal officials to back off. Tesla has said the Justice Department was also investigating its autonomous driving technology.