A federal judge in New York gave final approval Tuesday to the $40 million settlement between Tesla, its chief executive officer Elon Musk, and the SEC over Musk's tweets about plans to take the company private.

The approval comes following Musk's tentative settlement on Sept. 29, in which he agreed to step down as chairman of Tesla's board of directors for three years and pay a $20 million fine. Tesla agreed to pay an additional $20 million and to install two new outside directors on the board. Musk will remain as CEO.

Money from the settlement will be distributed through a court-approved process to investors who lost out following Musk's tweet.

DON'T MISS: Tesla CEO Elon Musk settles lawsuit with SEC for $40M, will step down as chairman

All that remained was for a court to approve the settlement, which U.S. District Judge Alison Nathan did Tuesday, according to a Bloomberg report.

The settlement came about two months after Musk's tweet in early August that he had "funding secured" to privatize Tesla at a significant premium over its stock price at the time. The SEC launched an investigation and subsequently found that Musk's tweet constituted a false and misleading statement to investors.

Discussions Musk said he had with Saudi investors did not constitute secure funding, the SEC charged in a lawsuit against the executive and Tesla.

ANSWER THIS: Who should lead Tesla's board after Musk steps down? Take our Twitter poll

More recently, it had been unclear if the court would approve the settlement after Musk taunted the SEC in a later tweet, calling it the "Short-seller Enrichment Commission."

The judge's approval puts the SEC's action to rest, except for the question of who should replace Musk as chairman. The Justice Department has also reportedly launched a criminal investigation into Musk's original tweet, though the Justice Department does not confirm such actions.