Elon Musk has tweeted himself into serious trouble.

The Securities and Exchange Commission sued Tesla's CEO on Thursday for making "false and misleading" statements to investors. It's asking a federal judge to prevent Musk from serving as an officer or a director of a public company, among other penalties.

The complaint hinges on a tweet Musk sent on August 7 about taking Tesla private.

"Am considering taking Tesla private at $420," Musk said. "Funding secured."

The SEC said he had not actually secured the funding.

"In truth and in fact, Musk had not even discussed, much less confirmed, key deal terms, including price, with any potential funding source," the SEC said in its complaint.

That tweet, and subsequent tweets from Musk over the next three hours, caused "significant confusion and disruption in the market for Tesla's stock," as well as harm to investors, the SEC said. On the day of Musk's tweet, Tesla's stock shot up nearly 9%. It has declined substantially since then.

Tesla's (TSLA) stock dropped more than 11% in after-hours trading Thursday.

"This unjustified action by the SEC leaves me deeply saddened and disappointed," Musk said in a statement. "I have always taken action in the best interests of truth, transparency and investors. Integrity is the most important value in my life and the facts will show I never compromised this in any way."

Tesla and its board of directors said in a joint statement that they are "are fully confident in Elon, his integrity, and his leadership of the company."

"Our focus remains on the continued ramp of Model 3 production and delivering for our customers, shareholders and employees," the statement said.

Stephanie Avakian, co-director of the SEC's enforcement division, said at a press conference Thursday that the agency is committed to holding people accountable despite "celebrity status or reputation as a technological innovator."

The complaint alleged that Musk rounded up the go-private price to $420 per share "because he had recently learned about the number's significance in marijuana culture" and thought his girlfriend would find it funny. He was dating the musician Grimes.

Musk did not consult with any board members, employees or outside advisers before he sent the tweets, according to the SEC.

"This is serious. This is what you go after insider traders and market manipulators on," said Charles Whitehead, professor at Cornell Law School. "This is a serious allegation."

Musk abandoned the plan to take Tesla private less than three weeks after he first tweeted about it. He later said his "funding secured" comment was based on talks with Saudi Arabia's sovereign wealth fund, which he said had urged him to take the company private and offered to increase its investment in Tesla.

Am considering taking Tesla private at $420. Funding secured. — Elon Musk (@elonmusk) August 7, 2018

The Justice Department is also investigating comments made by Musk, Tesla said last week. The company said it had received a voluntary request for documents and is cooperating. Tesla said it had not been subpoenaed.

Shareholders have also filed lawsuits charging that Musk made the claim to manipulate the stock price.

Musk has brought a string of bad headlines down on himself with erratic behavior. He has fired off tweets late at night and brushed off analysts on corporate earnings calls. He disparaged a man who was working to rescue boys trapped in a cave in Thailand, and sparred with journalists and investors he believed were unfair to him. Musk vowed to launch a website called Pravda to critique the media.

-- CNNMoney's Matt Egan and Jackie Wattles contributed to this report.