Wrapping up a tumultuous week, Tesla CEO Elon Musk will resign as chairman of the company’s board and pay a $20 million fine to settle a fraud complaint with the U.S. Securities and Exchange Commission, the agency announced Saturday.

The settlement comes two days after Musk hit back at the allegations, telling this news organization that they were “unjustified” and that they left him “deeply saddened and disappointed.”

But after stock prices dropped more than 10 percent Friday, Musk agreed to settle with federal regulators.

“Musk might be a genius when it come to electric cars and space travel,” said Joseph Grundfest, a Stanford Law School professor and former SEC commissioner, “but he’s a little bit of a numbnut when it comes to dealing with the SEC.”

The announcement brings a rapid resolution of the charges against a chief executive as closely linked to his company as Steve Jobs was to Apple. Under the agreement, the SEC will allow Musk to remain CEO of the company he founded.

Federal regulators sued Musk on Thursday for misleading investors when he tweeted that he had secured financing to take the electric car maker private for $420 a share.

Palo Alto-based Tesla also will pay a $20 million fine to settle a charge that, when it came to Musk’s tweets, the company failed to have required  procedures in place. Under the settlement, Tesla will monitor Musk’s communication, the SEC said in a news release.

“He won’t be able to tweet unless he runs it by a sober, responsible adult,” Grundfest said, “and that’s a good thing for Elon and the world.”

Analysts were divided Saturday over what the news would mean long term for the company.

Trip Chowdhry of Global Equities Research said the settlement was “very good” for Tesla.

“The air of uncertainty is removed,” Chowdhry said. “I think the stock goes through the roof.”

But Tim Bajarin of Creative Strategies said there are still “too many questions that need to be answered” to predict how the company will manage.

According to federal regulators, Musk’s statements “falsely indicated that, should he so choose, it was virtually certain that he could take Tesla private at a purchase price that reflected a substantial premium over Tesla stock’s then-current share price, that funding for this multi-billion dollar transaction had been secured, and that the only contingency was a shareholder vote.”

Tesla’s stock price jumped by more than six percent after Musk’s tweets Aug. 7 and prompted significant market disruption, the SEC alleged.

“Neither celebrity status, nor reputation as a technological innovator, provide an exemption from the federal securities laws,” said Stephanie Avakian, co-director of enforcement for the SEC, during a press conference Thursday announcing the charges.

Under the terms of the settlements, which are subject to court approval, Musk will remain the company’s chief executive but must step down as chairman within 45 days. Musk will not be eligible to be chairman for three years, although he will continue to serve on the board as a director. Tesla will also name two independent board directors.

It was not immediately clear who would lead the board. Gene Munster of the venture capital firm Loup Ventures said the shakeup is an opportunity for the company to bring in an outsider without longstanding ties to Musk who can provide strong leadership.

“Don’t ruin the opportunity by appointing a chairperson who is an existing board member,” Munster said.

Bajarin said he had expected the SEC to be “stern” with Musk, given the seriousness of the charges.

“I suspect in the end, he got probably what I would consider the least amount of punishment,” Bajarin said, “in the sense that he’ll be able to run the company and drive the company.”

Musk is considered by many to be a visionary who saw the potential of electric cars and was convinced they could be successfully manufactured in the U.S.  He and the 15-year-old company have developed a loyal fan base.

Chowdhry thinks eliminating Musk’s role as chairman will allow him to focus on the business side of things.

“At the end of the day, what people care about is, is he super smart? Is he super innovative? Is Tesla the benchmark of innovation? The answer is yes,” Chowdhry said.

The combined $40 million in settlement money will be distributed to investors who have been harmed, according to the release.