The world’s richest man, once deeply skeptical of Donald J. Trump, has now endorsed him and has emerged as a central character in the presidential race.

Elon Musk, left, and President Donald J. Trump in 2017 at the White House during a breakfast for business leaders.

Elon Musk, left, and President Donald J. Trump in 2017 at the White House during a breakfast for business leaders. Mr. Musk has transformed himself from an idealistic supporter of Democrats into a fierce ally of Mr. Trump.

A little over two months ago, Elon Musk found himself at Montsorrel, the palatial Palm Beach compound of Nelson Peltz, the famed activist investor. Mr. Musk knew the sprawling grounds well, having stayed in the guesthouse.

The topic of conversation was a bit different than usual, though: Mr. Peltz had brought together a group of billionaire conservative financiers — including Steve Wynn, the Las Vegas casino magnate, and the hedge-funder John Paulson — to dive into concerns about whether Republicans could seize Senate control, as well as the party’s weak ground game, according to a person with direct knowledge of what transpired.

But Mr. Musk had a darker message that spring day. He told the group that this would be the last free election in America — because if President Biden won, millions of undocumented immigrants would be legalized and democracy would be finished, according to the person.

Mr. Trump had to win, Mr. Musk said. He dispensed some advice for the veteran financiers, who had decades more experience in Republican politics than he did: Their emphasis on political advertising was misplaced, he said. Tesla, his electric car company, barely advertises, he said, but had still built a cult following through word of mouth. Why couldn’t Republicans do the same?

The most important thing that the financiers could do, Mr. Musk said, was ask two people to support Mr. Trump, and urge them to ask two more. Two people by two people — that’s how the former president would win.

Mr. Musk has transformed himself from an idealistic supporter of Democrats like Barack Obama into a fierce ally of Mr. Trump, whom he flirted with for months and endorsed last weekend roughly 30 minutes after the former president survived an assassination attempt.

In fact, Mr. Trump’s campaign at one point had talked with Mr. Musk about him delivering remarks at this week’s Republican National Convention. Mr. Musk said on Thursday he was not speaking.

Mr. Musk is more comfortable than ever revealing his conservative sympathies. But the role that he has played in supporting Republicans financially is not widely known, in part because he has tried to avoid making public donations.

He has emerged as a central character in the presidential race, targeted by the Biden campaign and celebrated as an almost mythical figure by Mr. Trump’s advisers. Angry at liberals over immigration, transgender rights and the Biden administration’s perceived treatment of Tesla, the mercurial Mr. Musk has undergone a midlife reinvention that has many Republicans salivating about him as the party’s moneymaker — if only he will deliver.

This article is based on interviews with about two dozen of Mr. Musk’s political associates, friends and Republican Party allies, many of whom insisted on anonymity to disclose private conversations. Mr. Musk and his aides did not respond to requests for comment.

Woody Johnson, a pre-eminent Republican fund-raiser and Mr. Trump’s former ambassador to Britain, said he welcomed Mr. Musk into the party as an ideological convert.

“Explore all ideas — and come up with the best one,” Mr. Johnson quipped in an interview. “There’s nobody in the world like Musk. We’re lucky as Americans to have him. He is the most innovative — besides Trump.”

Image

A campaign sign for Donald Trump and Mike Pence hangs on a barbed-wire fence in Reno, Nev., in 2016.

Leading up to the 2016 presidential election, Mr. Musk said that Mr. Trump was “not the right guy.”Credit…Max Whittaker for The New York Times

Mr. Musk was once allergic to Washington. He maintained a decent relationship with Mr. Obama and made several White House visits to build support for Tesla and SpaceX, his rocket manufacturer. But he generally disliked meeting with other politicians and saw political donations as a necessary evil, according to four people who worked with him.

Days before the 2016 election, he told CNBC that Mr. Trump did not “seem to have the sort of character that reflects well on the United States.” After Mr. Trump won, Mr. Musk told some associates that the outcome was proof that they were living in a simulation, according to one person close to him. In 2020, Mr. Musk, in a private conversation with another associate, called Mr. Trump a “stone-cold loser.”

In 2022, the former president, for his part, used an expletive to describe the Tesla chief executive at a rally.

Mr. Musk also predicted that Mr. Trump’s days as a political force were finished, according to a private message that was viewed by The New York Times, as he prepared to voice support for Gov. Ron DeSantis of Florida, whose campaign he helped kick off in 2023.

Image

Elon Musk exiting a car last year on Capitol Hill.

Mr. Musk last year on Capitol Hill. He was once allergic to Washington, but has increasingly waded into politics.Credit…Kenny Holston/The New York Times

Mr. Musk has become an obsession of many Trump officials and Republican fund-raisers, who see him as the party’s next great hope — or a meal ticket for themselves. But over the years, he has acquired a reputation in political circles as something of a flake.

Some conservative activists said they wished that Mr. Musk had followed through more on promises to fund free-speech lawsuits by people who believed that they had been censored on social media.

Mr. Musk can be hard to pin down, and rumors fly about him in Republican circles. In 2023, when Kevin McCarthy was elected as House speaker, the California politician gave a party at the Library of Congress, and some aides were told until shortly beforehand to expect Mr. Musk to show up and speak. But he didn’t, disappointing some in the crowd, a person involved in the event recalled.

Mr. Musk has also been unreliable in local politics. He wrote last year on X that he planned to donate $100,000 to GrowSF, a centrist group in San Francisco, so it could help defeat a progressive city official. But Mr. Musk did not donate or even contact the group, said Steven Buss, one of GrowSF’s founders.

Image

Kevin McCarthy speaking at a news conference in 2023, when he was still House speaker.

Kevin McCarthy in 2023, when he was still House speaker. In 2017, Mr. Musk donated $50,000 to the McCarthy Victory Fund, a group aligned with Mr. McCarthy.Credit…Haiyun Jiang for The New York Times

Mr. Musk has said that he tries to stay out of politics, and he has not donated to a federal political group since the 2020 cycle, according to campaign finance records. He has gone to great lengths to avoid leaving a public footprint of the contributions he does make.

Indeed, he learned a tough lesson when he made his largest disclosed gift ever, a $50,000 donation in 2017, to the McCarthy Victory Fund, a group aligned with Mr. McCarthy. The disclosure of that donation angered liberals. He learned from that experience to prioritize giving to dark-money organizations, a person familiar with his thinking recalled.

In recent communications with Republicans, Mr. Musk and his associates have expressed a desire not to make political contributions to groups whose donations must be legally disclosed. He told a friend a few months ago that he wanted to find a way to support Trump but didn’t want to do it publicly, the friend recalled.

During the Republican presidential primary race, Mr. Musk’s team had detailed talks with allies of Vivek Ramaswamy about making a major donation to a dark-money group backing the entrepreneur’s candidacy, according to a person briefed on the talks. Mr. Musk attended two fund-raisers for Mr. Ramaswamy, in California and Texas, two people briefed said, but he ultimately declined to cut a check.

In 2023, he strongly considered making a significant political donation to the American Action Network, a 501(c) (4) dark-money group steered by Mr. McCarthy’s political operation, according to a person with knowledge of the discussions. It’s not clear if he gave.

Image

Nelson Peltz, the activist investor, at an event in Saudi Arabia alongside two other people.

Nelson Peltz, center, the activist investor, is said to have played a role in encouraging Mr. Musk to draw closer to Mr. Trump.Credit…Tamir Kalifa for The New York Times

As Mr. Musk sought help on politics, the people he turned to sought to influence him.

He had gotten to know Mr. McCarthy over the last decade thanks to the former speaker’s advocacy for SpaceX. They now text frequently, and Mr. Musk has often relied on Mr. McCarthy over the years for advice on politics and lobbying.

Mr. McCarthy has been eager to highlight his relationship with Mr. Musk, and has gone to great lengths to cultivate him, according to people familiar with their relationship.

He interviewed the billionaire at an exclusive conference in Sea Island, Ga., hosted by the conservative American Enterprise Institute, and invited Mr. Musk to headline a fund-raising retreat for Mr. McCarthy’s donors in Wyoming. Mr. Musk also flew to Washington for the congressman’s birthday last year.

Mr. McCarthy has helped develop Mr. Musk’s relationship with Mr. Trump, but he has not been alone. Three close friends of the former president — Mr. Peltz, Mr. Wynn and Steve Witkoff, whose firm invested in the billionaire’s Twitter takeover — plus Mr. Musk’s emerging confidant, Diesel Peltz, a son of Nelson Peltz — have played a role in encouraging Mr. Musk to draw close to Mr. Trump, according to people familiar with the relationships. Mr. Musk also talks frequently with Mr. Ramaswamy, who has become a Trump surrogate, another person said.

Mr. Wynn said in an interview that Mr. Musk was “dedicating himself to making sure this election ends up properly” but downplayed his own role.

“He did that without my help,” he said. “Elon is a self-propelled rocket.”

Some of Mr. Musk’s friends in Silicon Valley have also bent his ear, including members of the so-called PayPal Mafia, a group of early executives at the payments company that includes the Trump donors David Sacks and Ken Howery, the people said.

Mr. Musk used to live primarily in Los Angeles, but people close to him said his politics had been shaped by his more conservative social circle in his new home state of Texas. Joe Lonsdale, a co-founder of Palantir who lives in Texas, and his aides have spent considerable time with Mr. Musk talking about politics, and Mr. Musk has told others that he is worried about what would happen to his businesses if Texas went blue, the people said.

But some of Mr. Musk’s more liberal friends and associates have expressed unhappiness to him about his rightward drift, according to three people familiar with the situation. Some said they have received private assurances from Mr. Musk that he is not donating to support Mr. Trump.

The extremist direction of Mr. Musk has bothered his own high-profile, celebrity lawyer, Alex Spiro, according to two people who have spoken to him. Mr. Spiro, who declined to comment, has encouraged Mr. Musk not to alienate Democrats from his businesses, citing the famous quip from Michael Jordan that “Republicans buy sneakers, too,” one of the people said.

Image

The empty rally grounds after the assassination attempt against Donald Trump in Butler, Pa.

Roughly half an hour after the assassination attempt against Mr. Trump, Mr. Musk endorsed him on social media.Credit…Doug Mills/The New York Times

It appears those liberal friends are losing the tug of war. Mr. Musk met with Mr. Trump in March and now talks with him directly on occasion, according to people familiar with the relationship. The two have spoken about electric vehicles, as well as technology like so-called deepfake videos, the former president has told donors who relayed his remarks.

During the Trump term, Mr. Musk once asked his top executives at Tesla how many of them had voted for Mr. Trump, and was alarmed to hear that none of them had, according to a person with knowledge of the meeting.

“I have had some conversations with him, and he does call me out of the blue for no reason,” Mr. Musk said last month at Tesla’s annual shareholder meeting.

Mr. Musk and Mr. Sacks organized a private dinner this spring in Los Angeles with several other anti-Biden billionaires, who talked about ways to oppose Mr. Biden’s re-election.

Whether Mr. Musk might financially support the Republican ticket has flummoxed Mr. Trump’s aides. For much of this year, Mr. Musk entertained to friends the notion of an endorsement, or at least urging his followers explicitly not to vote for Mr. Biden, according to two people who spoke directly with Mr. Musk. The billionaire told these people that he wanted to wait until the president formally captured the Democratic nomination before he made a proclamation.

Then came the assassination attempt.

Within an hour of the shooting, Mr. Musk went on X and endorsed Mr. Trump.

Mr. Lonsdale has helped start a new super PAC that its donors say will fund an aggressive field program to aid Mr. Trump, and several of Mr. Musk’s close friends have pooled their millions behind the group. The Wall Street Journal reported that Mr. Musk had spoken of donating $45 million per month to the group — energizing both the Trump and Biden teams. But Mr. Musk has told people close to him that the figure is false, and while people close to the group said that while they expect him to give, they don’t know how much.

In recent weeks, Mr. Musk privately lobbied Mr. Trump to choose Senator J.D. Vance of Ohio as his running mate. He celebrated vociferously on Monday after Mr. Vance was announced as the pick.

Trevor Traina, a Republican fund-raiser in San Francisco who served in the Trump administration and knows Mr. Musk socially, said he saw parallels between the two men.

“He has had to walk the same road as Trump — silenced, targeted, canceled — and within the last couple weeks,” Mr. Traina said of Mr. Musk, “he has decided it’s time to take action.”

Maureen Farrell and Kirsten Grind contributed reporting. Alain Delaquérière contributed research.

Theodore Schleifer writes about campaign finance and the influence of billionaires in American politics. More about Theodore Schleifer

Ryan Mac covers corporate accountability across the global technology industry. More about Ryan Mac