Tesla Inc. (TSLA - Get Report) shares surged Monday after Elon Musk agreed to settle fraud charges with the Securities and Exchange Commission over the weekend in a deal that will allow him to remain CEO of the company he founded, even as he is forced to step down as chairman of the board.

Musk reached at settlement with the SEC just two days after authorities said he had made false and misleading" statements on August 7 when he told his 22.7 million Twitter followers that he had "funding secured" to take the clean-energy carmaker private at a price of $420 per share. Musk agreed to pay $20 million -- while Tesla agreed to pay the same amount -- to the SEC in exchange for Musk's departure from the board and the naming of two new independent directors and a chairman.

"The prompt resolution of this matter on the agreed terms is in the best interests of our markets and our investors, including the shareholders of Tesla," said SEC Chairman Jay Clayton. "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."

"In addition, holding individuals accountable is important and an effective means of deterrence. I believe the settlements agreed today reflect these multiple interests and considerations.," Clayton added.

Tesla shares were marked 15.9% higher at the opening bell and changing hands at $305.23 each, a move that take sthe stock close to break-even on the year and value the Palo Alto, Calif.-based carmaker at around $51.5 billion.

In fact, the early market moves, which have added some $6.5 billion to the group's market value, seem an excellent return on capital for the $40 million that Musk and Tesla have agreed to pay the SEC.

In a letter to Tesla shareholders, dated September 30, Musk said the group was "very close to achieving profitability", adding that "if we go all out tomorrow, we will achieve an epic victory beyond all expectations."

The SEC had sought to remove Musk from his role as Tesla CEO and bar him from serving in a similar capacity at any other U.S. company, and return of "any ill-gotten gains" from the Tweet and an undisclosed civil fine, when it filed its initial charges

"Integrity is the most important value in my life and the facts will show I never compromised this in any way," Musk said in a statement at the time.

Musk isn't compelled to admit or deny the findings of the SEC probe, under terms of the settlement which still need court approval, but the fact that he is able to retain control of the company, just as it appears to be meeting his own bold production targets for the flagship Model 3, will come as a tremendous relief to investors who have suffered through two months of extreme headline volatility surrounding the clean-energy carmaker.

Tesla: 15 Years of Automotive History

JPMorgan issued a note on Tesla Friday that said Musk's continued involvement as an officer of the firm was crucial to its success, and said increasing questions over his fate could harm the company's ability to raise capital on "amenable" terms. Bob Lutz, a former General Motors (GM - Get Report) executive and a long-time Tesla critic, told CNBC Tesla would likely be unable to raise new capital if it were under an active SEC investigation.

Musk sent the now-infamous Tweet at 12:48 pm eastern time on August 7, causing the stock to immediately spike 6% to an all-time high of $387.46 each. However, given the lack of detail in the communication, and subsequent statements from Musk himself, the stock has decline sharply since then as investors questioned not only Musk's preferred form of communication but also a series of increasingly troubling actions from the 47 year old billionaire and some high-profile departures from Tesla's management team..

In fact, Musk's public behaviour since the August Tweet has raised serious questions over his ability to run a public company, with the billionaire founder himself telling the New York Times last month that the past year has been the "most difficult and painful" of his career.

Since that interview, however, Musk has courted controversy -- and added to his increasingly active legal calendar -- by reviving a spat with Vernon Unsworth, a British diver who was part of the rescue team that extracted twelve Thai boys from a local football team, along with their coach, trapped in a cave beneath the Doi Nang Non mountain on the border of Myanmar.

"He's an old, single white guy from England who's been travelling to or living in Thailand for 30 to 40 years, mostly Pattaya Beach, until moving to Chiang Rai for a child bride who was about 12 years old at the time," Musk told Buzzfeed in an email earlier this week in which he referred to Unsworth as 'child rapist'. "There's only one reason people go to Pattaya Beach," Musk allegedly told Buzzfeed.

"The man that created tens of billions in market capitalization for an unprofitable enterprise through sheer salesmanship is going further and further down a road that will destroy it," wrote Real Money contributor David Butler. "With each tweet, every absurd statement, every promise that cannot be kept, Musk is destroying the credibility that Tesla so desperately needs in order to succeed."