DETROIT (AP) — Tesla CEO Elon Musk is asking a federal judge to nullify a subpoena from securities regulators and throw out a 2018 court agreement in which Musk had to have someone pre-approve his posts on Twitter.

In a motion filed Tuesday in U.S. District Court in Manhattan, Musk attorney Alex Spiro contends that the subpoena from the U.S. Securities and Exchange Commission (SEC) has no basis in law. He also says the SEC can’t take action about Musk’s tweets without court authorization.

READ MORE: What Is The Best Sunscreen For Me? Environmental Working Group Releases Annual Guide

Spiro says the SEC has used the court agreement “to trample on Mr. Musk’s First Amendment rights and to impose prior restraints on his speech.”

The SEC declined comment Tuesday. In the past it has denied issuing subpoenas in the Musk Twitter case.

The dispute, which had been limited to letters to Judge Alison Nathan this year, stems from an October 2018 agreement in which Musk and Tesla each agreed to pay $20 million in civil fines over Musk’s tweets about having the money to take Tesla private at $420 per share. The funding was far from secured and the company remains public, but the tweet drove up the stock price. The settlement specified governance changes, including Musk’s ouster as board chairman, as well as pre-approval of Musk’s tweets.

READ MORE: Parole Denied For Don Miller Who Killed 4 Women In Lansing In The 1970s

Spiro’s motion asks Nathan to scrap the agreement, alleging the SEC is using it and “near limitless resources” to chill Musk’s speech. It says that Musk signed the agreement when Tesla was a less mature company and SEC action jeopardized the company’s financing.

It says the SEC subpoenaed Tesla in November after Musk tweeted about a plan to sell 10% of his Tesla stock to pay taxes. The subpoena sought information about whether Musk got approval from Tesla before his tweets, and how Tesla complied with the court agreement.

Spiro contends the subpoena is one in a “winding parade” of investigations into Musk and his companies that are being done without a factual basis.

MORE NEWS: Michigan Court Seeks More From Whitmer About Abortion Ban Challenge

© 2022 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.