Just one day after the SEC sued Elon Musk for securities fraud, in a move that shocked many who were skeptical the US regulator would do anything more than slap a few wrists - an action which it took only after it emerged that Musk had turned down a settlement offer from the SEC in the last minute - Musk, having seen TSLA stock tank the most in three years on Friday, changed his mind once again, and agreed to settle the case.

According to a settlement filing posted on the case docket on September 29, the SEC settlement is on almost identical terms to the deal he had rejected as recently as Thursday morning: it will require Musk to step down for 3 years as Chairman (up from two years in the 1st deal), pay a $20 million fine together with Tesla which will also pay a $20 million fine with the total $40 million in penalties will be distributed to harmed investors under a court-approved process, comply with Tesla's mandatory procedures for how to tweet going forward, but he will be able to continue as the company's CEO and return as Chairman after 3 short years.

“As a result of the settlement, Elon Musk will no longer be Chairman of Tesla, Tesla’s board will adopt important reforms -- including an obligation to oversee Musk’s communications with investors -- and both will pay financial penalties,” Steven Peikin, co-director of the SEC’s Enforcement Division, said in a statement. “The resolution is intended to prevent further market disruption and harm to Tesla’s shareholders.”

As part of the deal, Musk will also neither admit nor deny guilt, effectively confirming that all those who were skeptical of the SEC's regulatory interests, were correct after all as the settlement now makes any potential criminal case more complicated.

Among other relief, the settlements require that:

Tesla will appoint a total of two new independent directors to its board;

Tesla will establish a new committee of independent directors and put in place additional controls and procedures to oversee Musk’s communications;

Musk and Tesla will each pay a separate $20 million penalty. The $40 million in penalties will be distributed to harmed investors under a court-approved process.

Tesla had come under criticism for years prior to Musk’s take-private episode for lax governance, though shareholders sided with the board in June by voting against an independent chairman measure and approved the reelection of two directors.

And, we'll repeat it because it bears repeating, having cost ordinary investors billions of dollars with his manipulative, fraudulent tweet, all the SEC asks is for Musk to make sure he preclears all his future tweets that "contain information material to the Company." One couldn't make this up.

In short: securities fraud will get most ordinary people thrown in prison, but if you can afford $20 million and temporarily losing a token title in your resume, you get away scott-free.

Here are the key sections in the settlement filing that hit the SEC vs Musk docket late on Saturday afternoon:

Without admitting or denying the allegations of the complaint (except as provided herein in paragraph 13 and except as to personal jurisdiction as to this matter only and subject matter jurisdiction, which Defendant admits), Defendant hereby consents to the entry of the final Judgment in the form attached hereto (the “Final Judgment”) and incorporated by reference herein, which, among other things: (a) permanently restrains and enjoins Defendant from violation of Section 10(b) of the Securities Exchange Act of 1934 (the “Exchange Act”) [15 U.S.C. § 78j(b)] and Rule 10b-5 thereunder [17 C.F.R. § 240.10b-5]; (b) orders Defendant to pay a civil penalty in the amount of $20,000,000 under Section 21(d)(3) of the Exchange Act [15 U.S.C. § 78u(d)(3)]; and (c) requires Defendant to comply with the undertaking set forth in this Consent and incorporated in the Final Judgment

Here is what Musk will have to do next:

Defendant undertakes to: (a) resign from his role as Chairman of the Board of Directors of Tesla, Inc. (“Chairman”) within forty-five (45) days of the filing of this Consent and agree not to seek reelection or to accept an appointment as Chairman for a period of three years thereafter. Upon request by Defendant, the Commission staff may grant in its sole discretion an extension to the deadline set forth above; (b) comply with all mandatory procedures implemented by Tesla, Inc. (the “Company”) regarding (i) the oversight of communications relating to the Company made in any format, including, but not limited to, posts on social media (e.g., Twitter), the Company’s website (e.g., the Company’s blog), press releases, and investor calls, and (ii) the pre-approval of any such written communications that contain, or reasonably could contain, information material to the Company or its shareholders; and

And while the settlement clears up much of the potential legal confusion ahead, Musk is still on the hook for any potential criminal liability.

Defendant acknowledges that no promise or representation has been made by the Commission or any member, officer, employee, agent, or representative of the Commission with regard to any criminal liability that may have arisen or may arise from the facts underlying this action or immunity from any such criminal liability

News of the settlement could prompt another vicious round of short covering on Monday as the threat of Musk losing his CEO role at the company now appears to be gone.

“This is a good resolution for Tesla stakeholders,” Ben Kallo, an analyst at Robert W. Baird & Co., said in an email to Bloomberg. “I expect the stock to trade materially higher on this and into the quarter where we can focus on the fundamentals.”