After three years, Tesla chief executive will bow out as chairman and pay a $20 million fine after a deal was struck with the Securities and Exchange Commision in regards to a securities fraud case.

The deal comes just two days after the SEC filed a lawsuit against Musk for fraud and misleading investor investors about a buyout of the popular electric car company when he tweeted “Am considering taking Tesla private at $420. Funding secured.”

Musk and Tesla have agreed to settle the charges against them without admitting or denying the SEC’s allegations.

In the new deal, Musk will step aside as chairman but will maintain his role as chief executive officer. On top of the $20 million fine, Tesla, which is also settling, will pay a $20 million penalty.