Tesla and its CEO Elon Musk have reached a settlement with the US Securities and Exchange Commission (SEC) that will see Musk step down as the company’s chairman but retain his CEO position.

Tesla and Elon Musk have also agreed to pay USD20m each – as compensation to investors – to financial regulators in a settlement that follows an SEC lawsuit prompted by Musk’s ‘false and misleading’ Twitter statements about taking the company private in August. The tweets suggested Musk had the backing to take the company private, but were not based on fact and sent Tesla’s share price down. There was also very little backing inside Tesla or among major investors for Musk’s delisting suggestion.

As part of the settlement there will also be two new independent Tesla board members appointed to counter Musk’s disproportionate power over the company. The settlement also muzzles Musk’s ability to rant on social media, requiring Tesla to “implement mandatory procedures and controls to oversee all of Elon Musk’s communications regarding the company made in any format.”

Reports say, however, that Musk still faces lawsuits from out-of-pocket investors (hit by the resultant share price decline) and a criminal fraud investigation by the Department of Justice.

Investors, though, will likely be relieved that a lengthy legal battle with the SEC has been avoided.

See also: US regulator sues Musk for fraud