Tesla chief executive Elon Musk told a federal judge Monday that he should not be held in contempt of court for tweets that the government says violated a settlement agreement with the billionaire.

The Securities and Exchange Commission is attempting an “unconstitutional power grab” to unfairly muzzle Musk, his attorney argued in a 33-page court filing. The SEC’s effort “smacks of retaliation and censorship” after Musk said during a “60 Minutes” interview last year that he did not “respect” the SEC, the motion says.

The SEC had accused Musk of breaking a deal to seek preapproval of any potentially market-moving tweets and asked U.S. District Judge Alison J. Nathan in New York to hold Musk in contempt. Nathan gave Musk until Monday to file a response stating why he should not be held in contempt.

At the center of the SEC’s complaints are tweets Musk sent last month about production levels at Tesla. On Feb. 19, Musk said on Twitter that the company would make about 500,000 cars this year. Four hours later, he sent another tweet that clarified he “meant to say” the company’s weekly production rate would equal up to about 500,000 on an annual basis but that the total car deliveries this year would be closer to about 400,000.

The initial tweet was not preapproved and contained misleading information, the SEC said in a motion filed in U.S. District Court for the Southern District of New York. That violates a settlement agreement Musk and Tesla reached with the SEC in September after Musk was accused of lying to investors when he tweeted that he had “funding secured” to take Tesla private.

Musk “used his discretion” to determine that the first Feb. 19 tweet did not require preapproval, but he quickly posted the clarification out of an abundance of caution, his attorney said in the response to the SEC’s motion. “The message was that Tesla has come a long way and is now flourishing,” the motion said. “This was a celebratory string of tweets, expressing excitement about Tesla’s success since 2011 and pride for what Tesla anticipated achieving in 2019.”

In fact, Musk’s after-hours tweets did not move the company’s stock price, but the SEC’s motion to have him held in contempt did, sending Tesla’s stock price down 3.4 percent, the motion says.

Musk has gone out of his way to comply with the settlement, including sending half as many tweets as before, his motion argued. “This self-censorship is reflective of his commitment to adhering to the [settlement] and avoiding unnecessary disputes with the SEC,” the motion says. But “the SEC jumped at the first opportunity to move for contempt against Musk.”

The SEC’s interpretation of the agreement requires Musk to seek preapproval of any tweet about Tesla, no matter how minor, a violation of the billionaire’s free speech, Musk’s attorney argued in the motion. “The Court should reject the SEC’s invitation to trample on Musk’s First Amendment rights,” the motion says.

If the judge finds Musk in contempt of the settlement agreement, he could face severe consequences. Last year, the SEC suggested that he be barred from running a public company and fined him $20 million. Musk could also be forced to pay another fine or face more restrictions on his social media, legal experts say.

The SEC complaint comes at a time when Tesla faces crises on nearly every front — including demand doubts, growing debts, competitive pressures, and the ballooning costs of expanding into new cars and countries — but Tesla investors say the company is instead having to deal with the self-inflicted chaos of Musk’s social media accounts. The company recently announced that it was closing many of its retail stores and laying off staff to help get the Model 3 sedan’s price tag down to $35,000.

Also Monday, an attorney for former Tesla employee Sean Gouthro announced that a third whistleblower tip had been filed with the SEC against the company. In this tip, Gouthro, the former head of Tesla’s global security operations center and investigations, told the SEC that a potential plan to take Tesla private was discussed widely within the company before Musk’s infamous “funding secured” tweet but that the plan was viewed with deep suspicion, said Stuart Meissner, the attorney representing Gouthro.

Gouthro submitted his whistleblower complaint in January and updated it last week, said Meissner. His last day at the company was Dec. 12, 2018.

Gouthro’s tip backs up allegations by Karl Hansen, who submitted a whistleblower tip last year accusing the company of spying on employees, Meissner said. Hansen was fired by Tesla, which has denied his allegations.

A third employee, Martin Tripp, told the SEC he had witnessed dangerous conditions at the company, including punctured batteries installed in cars. Tesla has sued Tripp, accusing him of hacking the automaker's computer systems and stealing company secrets.

Tesla refuted Gouthro’s allegations. He worked at the company for only one year and was fired for “poor performance,” Tesla said in a statement. Last year, Gouthro was interviewed about some of the same issues that are part of his SEC tip but did not raise any concerns, the statement said.

“Like the claims of Mr. Meissner’s other clients, Mr. Gouthro’s allegations are untrue and sensationalized, only intended to seek the attention of the media,” the statement said.

The SEC didn’t immediately respond to a request for comment.

Musk has also faced trouble at SpaceX, the space company he founded. The Air Force recently announced that it was reviewing certifications it had granted SpaceX that allow the company to launch national security payloads.

After Musk smoked marijuana during a podcast appearance, NASA announced that it was conducting a safety review of SpaceX and Boeing. And Bloomberg News has reported that Musk’s marijuana use also prompted the Pentagon to review his security clearance.