Elon Musk reached a settlement today with the Securities and Exchange Commission (SEC) on a charge of securities fraud. Within the next 45 days, Musk will have to step down as chairman of Tesla and will be ineligible to return to that post for the next three years. However, Musk can continue in his role as the company's CEO. Additionally, Tesla was charged with "failing to have required disclosure controls and procedures relating to Musk’s tweets"—a matter which it promptly settled.

In August, Musk tweeted that he was taking the car maker private and had "funding secured" to do so at the price of $420 a share. The result was a significant spike in Tesla's share price that was reversed when it turned out that there was no such funding—nor much possibility of taking Tesla private under the circumstances Musk had promised.

The SEC was deluged with comments from investors—both short and long—who lost out as a result of Musk's tweets. The agency quickly began an investigation into the matter and proposed a settlement with Musk that he rejected, at which point the SEC sued him for fraud. Had that case gone to trial—a process in which the SEC overwhelmingly wins—the consequences for Musk could have been much greater; the SEC could have barred Musk from serving as an officer or director in any public company.

Musk and Tesla have each agreed to pay $20 million in penalties, which will be distributed to those investors who were harmed. "At the Commission, the interests of ordinary investors are at the front of our minds, and, in matters involving misconduct, we seek to serve those interests to the extent practicable while also ensuring that we remediate and deter misconduct," said SEC Chairman Jay Clayton in a separate statement released at the same time as news of the settlement.

On top of the combined $40 million in penalties, Tesla will have to increase the independence of its board, adding two new directors not linked to Musk. It will also have to rein in his use of social media, adding "controls and procedures to oversee Musk’s communications."