Malaysia had earlier halted the process for renewing Lynas' licence because of waste disposal concerns.
Lynas is the only significant producer outside China of rare earths, which have military applications and are used in batteries, computers, televisions and many other products.
"We will allow Lynas to carry on because otherwise we are going to lose a very big investment from Australia," Mahathir told reporters at a news conference in Tokyo. Mahathir is in Japan to attend a business conference.
Lynas is the only significant producer outside China of rare earths, which have military applications and are used in batteries, computers, televisions and many other products
Lynas' status as a non-Chinese producer came into sharper focus this week after major Chinese newspapers, including the official People's Daily, reported Beijing was ready to use rare earths to strike back in its trade war with the United States.
China supplied 80% of the rare earths imported by the United States from 2014 to 2017, when it accounted for 81% of the world's rare earth production, data from the U.S. Geological Survey showed.
Shares in Lynas have surged to more than five year highs on the mounting concern over the potential disruption to global supply chains if China does withhold supplies.
On Wednesday, Lynas shares rose more than 15%. On Thursday, they peaked at $3.09 before closing at $2.74, down 0.7 percent on the day, though trading ended before Mahathir's comments were reported.
"Obviously the strategic value of Lynas, given what has happened with the U.S. trade war, has just been highlighted," said Matthew Ryland of Greencape Capital, the company's second-biggest shareholder.
"That's a strategic value for all stakeholders not just Lynas shareholders. It's quite important for Malaysia now," he told Reuters.
The Lynas processing plant in Malaysia refines ore from a rare earths mine in Western Australia.
"We welcome the Prime Minister's comments and we will update the market when there are further developments," a Lynas spokesman told Reuters.
Lynas last week unveiled detailed expansion spending plans of A$500 million ($347 million) designed to boost production and placate Malaysian regulators' concerns about the waste disposal at its plant.
The plan hinges on Lynas receiving its Malaysian licence renewal in September and comes after the company in March rebuffed a $1.1 billion takeover offer from Australian conglomerate Wesfarmers Ltd.
Last December, Malaysia's environment minister said that Lynas must remove its waste stockpiles before the licence could be renewed. Lynas has maintained that it would not be possible for it to remove the waste within such a short timeframe.
"When we invited Lynas to invest in Malaysia we didn't expect that the waste would be a problem for us. A huge amount of waste is the result of processing…and there is some radioactivity," Mahathir said.
"We need to do something with the radioactive material, perhaps spread it so we don't have radioactive material concentrated in one place."