WASHINGTON – President Donald Trump threatened to end billions of dollars of federal contracts with Elon Musk's companies on June 5 after the alliance between Trump and the world's richest man blew up in spectacular fashion.

Trump brought up Musk's federal contracts in a post on Truth Social after the two men hurled personal attacks as Musk, a former top Trump advisor, tries to build momentum to defeat the president's tax and policy bill.

"The easiest way to save money in our Budget, Billions and Billions of Dollars, is to terminate Elon’s Governmental Subsidies and Contracts," Trump said in a post on his social media platform. "I was always surprised that Biden didn’t do it!"

In a separate post, Trump said he asked Musk to stop working at the White House. The Tesla and SpaceX CEO spent the past four months leading the administration's Department of Government Efficiency (DOGE), which set out to slash government bloat and eliminate waste, fraud and abuse.

"Elon was 'wearing thin,'" Trump said. "I asked him to leave, I took away his EV Mandate that forced everyone to buy Electric Cars that nobody else wanted (that he knew for months I was going to do!), and he just went CRAZY!"

Musk's various companies have benefited from billions of dollars in U.S. government contracts over the past two decades, including SpaceX through its relationships with the Department of Defense and the National Aeronautics and Space Administration.

In all, Musk and his businesses have received at least $38 billion in government contracts, loans, subsidies and tax credits, often at critical moments, a Washington Post analysis found, helping seed the growth that has made him the world’s richest person.

Musk responded to Trump's threat over government contracts by saying SpaceX will decommission its Dragon spacecraft, which the company describes as "capable of carrying up to 7 passengers to and from Earth orbit, and beyond."

"In light of the President’s statement about cancellation of my government contracts, @SpaceX will begin decommissioning its Dragon spacecraft immediately," Musk said on X.

SpaceX provides launch services to the Pentagon, including the launch of classified satellites and other payloads. CEO Gwynne Shotwell has said the company has about $22 billion in government contracts, according to Reuters. The vast majority of that, about $15 billion, is derived from NASA.

Musk's companies also have benefited from his relationship with Trump and his administration. Reuters reported last month that Musk's DOGE team was expanding its use of his artificial intelligence chatbot Grok in the U.S. federal government to analyze data. And it reported in April that SpaceX and two partners have emerged as front-runners to win a crucial part of Trump's "Golden Dome" missile defense shield, six people familiar with the matter said.

As far back as 2008, as the new CEO of a cash-strapped Tesla, Musk secured a low-interest loan from the Energy Department, two people directly involved with the process told The Washington Post.

The president's attacks came after Trump told reporters earlier that he was "very disappointed" with Musk and signaled his close relationship with the former top White House adviser was over as he publicly addressed Musk's efforts to kill his so-called "big, beautiful bill.

Musk quickly fired back with several attacks, including saying that Trump wouldn't have won a second term were it not for the quarter of a billion dollars in campaign cash he pumped into his 2024 campaign.

"Without me, Trump would have lost the election, Dems would control the House and the Republicans would be 51-49 in the Senate," Musk said in a post on X, the social media company he owns. "Such gratitude.

This article originally appeared on USA TODAY: President Trump threatens Elon Musk's billions in government contracts as alliance craters

Reporting by Joey Garrison and Josh Meyer, USA TODAY / USA TODAY

USA TODAY Network via Reuters Connect