The regulatory fight over Elon Musk’s bizarre tweeting habit is once again over, and once again the SEC has folded like a lawn chair.

Late on Friday, Tesla’s outspoken, if increasingly unpredictable and chaotic CEO, and the Securities and Exchange Commission said in a court that they are settling the long-running legal dispute over how Musk posts news about his electric-car company, avoiding a decision by a federal judge in New York on whether the billionaire should be held in contempt of court.

In the new settlement - which was the direct result of the SEC demanding the judge find Musk in contempt for his brazen violation of his prior settlement arising from his "funding secured" lawsuit - The SEC and Musk agreed to amend an earlier settlement to add specific topics he can’t tweet about or otherwise communicate in writing without explicit pre-approval from a Tesla lawyer. They include:

the company’s financial condition,

potential mergers or acquisitions,

production and sales numbers,

new or proposed business lines,

previously unpublished projections and forecasts, and

Musk’s purchase or sale of Tesla securities.

In other words, the SEC "punished" Musk for his fraudulent attempt to crush shorts with his infamous "funding secured" tweet, by demanding he not tweet inside information (and just in case he is confused, they also spelled out to the CEO what is considered inside information), something which would land virtually any other non-billionaire in jail instantly. But, when it comes to the SEC, Musk is clearly more equal than others. Perhaps it's time to start asking why.

Needless to say, this was another bruising defeat for the SEC, and another crushing victory for Musk, who will only feel even more emboldened to mock and disparage the clearly toothless SEC after this settlement.

Additionally, there was no mention in the court papers filed Friday of any new fines or additional controls on Musk, which had been a possibility. The agreement must be reviewed and approved by U.S. District Judge Alison Nathan before it can take effect; there is a small chance the Judge will throw up on the agreement and demand a stricter settlement from the SEC.

“This is a clear win for Elon Musk,” said Dan Ives, an analyst at Wedbush Securities in New York. “This removes an overhang on the stock because many feared this would not end well for Tesla. The bark ended up being worse than the bite. There’s no structural changes.”

Confirming this, Tesla stock, which had been battered all day and closed at multi-year lows and right where Musk's massive margin call may be called in, rose in extended trading, gaining as much as 1.4% after the close of regular trading.

As a reminder, Musk first under renewed wrist-slapping criticism from the SEC after a Feb. 19 tweet that the regulator said violated an October settlement between them, which had ended an earlier brouhaha over his proclamations on Twitter, as Bloomberg recounts. Musk said he hadn’t violated the agreement. Had Musk been found in contempt, the judge had the authority to impose hefty fines and new controls on how he communicates with the public.

At an April 4 hearing, Nathan told both sides to “put on your reasonableness pants” and gave them two weeks to work something out. She extended the deadline to April 25. Musk and the SEC on that date then asked for five more days to continue discussions.

The judge had urged both sides to try to eliminate ambiguities in the earlier settlement, which required Musk to get internal approval before issuing some tweets. By reaching a compromise, Musk would avoid more penalties while the SEC would affirm the Tesla CEO’s obligation not to release misleading information on social media.

Musk and the SEC have been fighting since the CEO tweeted Aug. 7 that he had “funding secured” to take Tesla private, sending the shares surging. After an investigation, the regulator sued, saying Musk had misled investors. Musk and Tesla ended that dispute by agreeing to each pay $20 million - most likely funded by his massive margin loan that he has taken out from Morgan Stanley - without admitting wrongdoing.

As part of the October deal, the two parties also agreed that any future social media posts by the CEO would be reviewed by a lawyer -- known as Musk’s Twitter sitter -- for any information that might affect investors’ decisions. As it later turned out, Musk instantly violated that agreement - resorting to claims that all his tweets are protected by the 1st amendment and thus can not be policed - and the SEC later accused Musk of violating the deal when he tweeted in February that Tesla would make about half a million cars in 2019. He corrected that a few hours later, after consulting with the internal lawyer, with a tweet saying deliveries would reach only about 400,000.

The regulator argued that Musk was required to have his tweet approved in advance under the terms of the settlement. Musk’s attorneys countered that the post wasn’t material and that the Tesla CEO has been complying with the accord.

Then, just to spit some more on the SEC's now obliterated credibility and reputation, last weekend Musk, for good measure, repeated his February claim, responding to another Twitter user’s post by tweeting "Tesla will make over 500k cars in next 12 months."

We fully expect Musk to violate this latest settlement in days, if not hours.

The full settlement agreement is below.

Musk Settlement Agreement by Zerohedge on Scribd