The Securities and Exchange Commission accused Tesla CEO Elon Musk of securities fraud Thursday in a civil lawsuit charging him with lying or recklessly misleading when he tweeted that he had "funding secured" to take the electric car company private.

In doing so, the Wall Street regulatory agency set in motion a legal showdown with tremendous stakes that could culminate in Musk's removal from Tesla leadership and cause serious financial damage to the company.

Though Musk claimed in a series of tweets Aug. 7 that he had arranged a deal to take Tesla private, he "had not even discussed, much less confirmed, key deal terms, including price, with any potential funding source," the SEC alleged in a complaint filed in federal court in New York City.

Besides financial penalties, the SEC is asking the federal court to block Musk from leading a public company or serving on the board of one, which would require him to leave Tesla.

Such an outcome would qualify as a crushing fall for an innovator who has set his sights on revolutionizing the automotive and energy industries.

"We allege that Musk’s statements were false and misleading because they lacked any basis in fact," said Stephanie Avakian, co-director of the SEC's Division of Enforcement, at a press conference Thursday.

Talking Tech:Search these terms on Google's 20th birthday for a fun surprise

Talking Tech:How an Iowa video game nerd makes up to $500,000 a year playing Fortnite

Talking Tech:Season 6 of 'Fortnite' is here: Everything you need to know

Musk has maintained that plentiful funding was available to turn Tesla into a private entity, which he briefly argued would help Tesla focus on long-term growth. He had said that Saudi Arabia's sovereign wealth fund effectively offered to finance the deal, though the fund has not confirmed that.

“This unjustified action by the SEC leaves me deeply saddened and disappointed," Musk said Thursday 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.”

The SEC charges focus on a series of tweets in which Musk told his approximately 22 million Twitter followers that he was considering a multi-billion dollar transaction that would take Tesla private at $420 per share — a significant premium to the price at the time.

During the next three hours, Musk tweeted his hope that current Tesla investors would remain with the company even if it became private but that investors could sell or continue to hold their shares. He said investor support had been confirmed.

His proposed price assumed a 20 percent premium on Tesla shares, plus "rounding up to $420 because of the significance of that number in marijuana culture and his belief that his girlfriend would be amused by it," Steven Peikin, co-director of the SEC Division of Enforcement, said at the news conference after the court filing.

More:For Elon Musk, star-touched vision and messy reality collide

More:Thai cave diver sues Elon Musk for defamation over 'pedo guy' tweet

Between the time of Musk's first tweet and the close of trading on August 7, Tesla shares gained more than 6 percent in value on significantly increased volume, the complaint said.

The shares have since declined sharply in value. In after-trading hours Thursday, when the complaint was filed, shares of Tesla plunged 11.8 percent to $271.52.

“Elon Musk and Tesla have a history of skirting traditional operational standards and spinning negative press," said Karl Brauer, executive publisher of Autotrader and Kelley Blue Book, in an email. "But there’s no spinning this one. An SEC lawsuit seeking to bar Musk from running Tesla, or any public company, is bad news on a personal and corporate level."

Citing the initial market reaction, the SEC said Musk's alleged false and misleading statements "caused significant confusion and disruption in the market for Tesla's stock and resulting harm to investors."

The agency noted that Tesla insiders were confused about the statements and fielded inquiries from journalists asking if the CEO was joking.

"The company's head of investor relations sent a text to Musk's chief of staff asking, 'Was this text legit?'" the court complaint said.

As one sign of the major hurdles to any deal that would take Tesla private, the SEC complaint cited an Aug. 6 conversation Musk had with a private equity fund partner experienced with such transactions. In the executive's experience, the deal structure contemplated by Musk was "unprecedented," the SEC complaint alleged.

In many major fraud cases brought by the SEC, companies seek to resolve them without allowing the federal courts to reach a verdict.

"In the worst case there will be a settlement with some penalty to Elon Musk," said Trip Chowdhry, managing director of equity research at Global Equities Research, in an email.

Former SEC enforcement official Alma Angotti, now serving as managing director of risk and compliance at Navigant Consulting, said the case could indeed result in Musk's removal.

"If they can prove that he knew it was false and misleading, or if he was reckless, they have a pretty good" case for securities fraud, Angotti said in an email.

It was not immediately clear Thursday whether Musk would mount a fiery defense, seek a deal or somewhere in between. But he is widely known in corporate America for his combative style.

For Tesla, which is currently trying to ramp up manufacturing of its critical Model 3 electric sedan, a future without Musk would raise serious questions about the company's direction.

Despite the urging of many analysts, Musk has not hired a chief operating officer to serve as a clear No. 2 executive to improve Tesla's operations, including its manufacturing efficiency.

Contributing: Chris Woodyard