Tesla (TSLA  ) CEO Elon Musk has had a contentious relationship with the Securities and Exchange Commission (SEC) for years. Now Musk says he's had enough and that a securities fraud settlement he reached with the agency in 2018 should be thrown out.

A recent court filing states that Musk was coerced into signing the agreement and that the agreement is being used "to trample on Mr. Musk's First Amendment rights".

The fraud settlement didn't include an admission of guilt, but it did include one $20 million fine for Musk, and another for Tesla. In 2019, it was revised to include a provision that requires Musk to get approval from a lawyer before posting regarding material business.

The initial fraud allegations were brought by the SEC regarding a 2018 tweet in which the billionaire tech bro wrote that he was "considering taking Tesla private at $420" per share and that he had "funding secured." The tweet led to an 11% stock increase for Tesla.

According to the SEC, Musk "had never discussed a going-private transaction at $420 per share with any potential funding source, had done nothing to investigate whether it would be possible for all current investors to remain with Tesla as a private company via a 'special purpose fund,' and had not confirmed support of Tesla's investors for a potential going-private transaction."

The 2019 revision was made after a tweet that February that included information about Tesla production numbers, something that the SEC argued was in direct violation of the 2018 agreement. Since then, Musk has been required to run all of his business-related tweets past Tesla's lawyers. Although, the SEC claims he hasn't been fulfilling that requirement.

To clear up some of those suspicions, in 2021, the SEC sought a subpoena covering evidence showing whether or not Musk asked for approval of his tweet polling his followers about whether or not he should sell off 10% of his Tesla holdings.

That subpoena is also being challenged by Musk's court filing, which refers to it as "but one in a winding parade of investigations... without factual basis." The court filing goes so far as to argue that the initial allegation of fraud was illegitimate.

"Funding was secured, and there was investor support," the filing reads. "Despite this, the SEC's unrelenting regulatory pressure, combined with the attendant collateral consequence of the SEC's complaint against me, caused a scenario in which I was forced to sign the consent decree in 2018,"

In February, Musk also accused the SEC of failing to distribute the $40 million in settlement funds to Tesla shareholders as agreed. Since then, the SEC has filed a plan to distribute the funds, which have grown to $41.2 million with interest. The SEC's filing for distribution approval did not mention Musk's accusations or the agreement dispute.