Elon Musk in 2017. (PETER PARKS/AFP/Getty Images) (Peter Parks/AFP/Getty Images)

He has fought back viciously by calling his opponents names like “saboteur,” “idiot” and “pedophile.” Now, Tesla chief Elon Musk is embracing the same kind of combative approach to wage the fight of his career against the Securities and Exchange Commission.

The coming legal clash will pit the volatile billionaire against a team of federal regulators, who say he manipulated markets and fraudulently misled investors by claiming in a series of tweets that he had secured the funding to take Tesla private. If the agency wins, it will seek to ban him from serving as an executive of any public company, including the electric automaker he has devoted his life to for 15 years.

Musk could have compromised earlier this week when the SEC offered to not press charges if he temporarily stepped down as chairman, people familiar with the matter said. But in a characteristically risky gamble, Musk rejected the deal. Instead, he is gearing up for war with the help of Chris Clark, the legal brawler whom another flamboyant billionaire, Mark Cuban, retained to beat the SEC’s charges of insider trading.

Musk said in a statement that the SEC’s “unjustified action" left him “deeply saddened and disappointed.” “Integrity is the most important value in my life and the facts will show I never compromised this in any way,” he added.

Hanging in the balance is Tesla, the $45 billion emblem of America’s future in battery-powered cars. The cash-burning giant has suffered a series of disasters under Musk’s unpredictable leadership, and legal experts predicted the SEC storm could top them all.

A protracted conflict could sidetrack employees and spook investors during one of Tesla’s most critical points in company history, as it struggles to emerge from a chaotic period of executive exits and factory crises that Musk has called “production hell.”

The SEC case, filed Thursday in a Manhattan federal court, appeared hand-crafted to send a message that the nation’s financial rules are non-negotiable even in the fast-and-loose environs of American tech.

But in Silicon Valley, a place of regulatory rebellion where legal and personal failings are not often disqualifiers for corporate leadership, some tech leaders lamented the consequences of the lawsuit for innovation and rode to Musk’s defense.

He “singlehandedly pushed forward an entire industry, putting the world on the path of a significant dent in carbon output. … That is an invaluable contribution to humanity,” said Justin Kan, a former partner at the prominent tech incubator Y-Combinator and the founder of the video-streaming site Twitch, which Amazon bought for $970 million. “Obviously that tweetstorm was very irresponsible, but maybe putting up with random tweeting is the price of saving the human race.”

The company’s stock plunged 14 percent on Friday, erasing more than $7 billion in shareholder value during the company’s worst trading day since 2013. Musk, the company’s largest shareholder, lost $1.6 billion in a single day.

Wall Street analysts also worried the case could spiral further out of control. Analysts at investment-research firm CFRA said Musk’s “erratic behavior” and uncertainty about his future could cement the case as a “serious blow."

Tesla’s board said in a statement that it was “fully confident in Elon, his integrity, and his leadership of the company, which has resulted in the most successful U.S. auto company in over a century.”

Musk is as close to sainthood as one can get in Silicon Valley, a sci-fi virtuoso who has captured imaginations with gambles on soaring rockets, electric supercars and brain-computer links. A critical element of his cult of personality: He rarely backs down from a fight.

The SEC’s lawsuit marks one of its most prominent civil fraud cases in years, and the speed with which it was filed — 51 days after Musk’s tweets — led legal experts to believe the agency’s investigators were abundantly confident they could win.

Regulators said Musk had barely formed a take-private proposal when he tweeted that it was all but certain in early August, sending Tesla’s stock soaring on the promise of what would have been one of the largest private-buyout deals in corporate history. The SEC complaint says Musk deceived shareholders when he insisted the deal had secured funding and investor support.

Regulators are pushing to bar Musk from public-company leadership, impose civil penalties and recoup “any ill-gotten gains” that followed his off-the-cuff tweets. “Unless restrained,” the SEC’s complaint states, Musk “will violate again.”

“The SEC is about order and rules. And Elon often operates as if he’s above the law,” said Gene Munster, a managing partner of the venture-capital firm Loup Ventures. “They want to make an example out of him. It’s become personal. They want blood.”

The Justice Department is also pursuing a fraud investigation against Musk that could bloom into a criminal case — a potential nightmare for his rocket firm SpaceX, which depends on government contracts.

Employees in the California offices of Tesla and SpaceX said the SEC case had further weakened morale and distracted from their already gargantuan tasks: meeting Musk’s hyper-ambitious expectations for revolutionizing driving and space travel.

The legal action comes in the final days of a quarter that Musk had promised would be profitable, marking a turning point for a company that has never turned an annual profit. The automaker has roughly $2 billion in cash and faces more than $10 billion in outstanding debts.

Tesla laid off 9 percent of its workforce this summer and has endured a mass exodus of executives, including heads of engineering, sales, supply-chain management, human resources and finance. Its chief accounting officer left this month after barely a month on the job.

But losing Musk would spark an existential crisis for Tesla, where he presides over every major decision and commands power that is virtually unchecked. One prominent Silicon Valley investor, who spoke on condition of anonymity to offer his candid assessment of the company, said Tesla faced a “total vacuum” of capability and confidence if Musk was kicked out.

“People buy Teslas because of Elon Musk," the investor said. “He’s the nucleus of the company, and there are no other people ready to jump in. That’s a very scary situation.”

The SEC’s case marked the second lawsuit against Musk in two weeks, after Vernon Unsworth, a British cave explorer influential in the rescue of a Thai soccer team, sued Musk for defamation. Musk had without evidence called Unsworth a “pedo guy” and “child rapist” after he had mocked Musk’s plan to save the teammates with a miniature submarine.

Those legal skirmishes could ramp up pressure on the board to map out a post-Musk succession plan as questions grow over his fitness for the job. Musk has said he combats anxiety with the sleeping drug Ambien, which in tweets he has alluded to mixing with red wine, and on a recent YouTube interview he smoked marijuana and admired a samurai sword.

The $420 share price Musk set for the take-private deal, SEC investigators said, was itself a weed reference designed to impress his then-girlfriend, the synth-pop musician Grimes. The company has said Musk is an engaged and thoughtful leader who remains more than capable for the job.

Musk’s rejection of an SEC settlement infuriated some investors who would have rather put the episode behind them. Ross Gerber, the chief of the investment firm Gerber Kawasaki that owns millions in company stock, said the board should “do what’s best for Tesla, not Elon’s ego.”

But some legal experts understood why Musk wouldn’t want to go down without a fight.

"When you’re talking about individuals whose life is their work, it is sometimes difficult for them to accept personal responsibility for something like this,” said Keri Curtis Axel, a former federal prosecutor and SEC attorney. Agreeing to a settlement that would mean giving up his power “changes his whole identity.”

Elizabeth Dwoskin and Renae Merle contributed to this report.