As billionaire Elon Musk scales back work for U.S. President Donald Trump, he’s laying the groundwork for a major role as a Republican political megadonor in next year’s midterm elections, according to four people with direct knowledge of the matter.

After announcing last week that his cost-cutting role at the White House was mainly done, Musk views his money and his social media platform X as potentially more powerful political tools than his time inside the government, when he became the face of Trump’s shakeup of the federal bureaucracy, one of the people said.

The people said they expect Musk, the world’s richest person, to remain influential with Trump as a political adviser while investing in Republican candidates in next year’s midterms.