The shareholder who filed the lawsuit accuses Musk of sowing doubts about the deal in order to drive down the value of the company.

The class action was filed in the US District Court for the Northern District of California.

The nondisparagement and nondisclosure clauses of Musk's contract with the company were argued to have been violated by his attacks.

Musk tried to create doubt about the deal and drive the stock down so that he could either back out of the purchase or negotiate a better deal.

Musk's conduct was and continues to be illegal, in violation of the California Corporations Code, and contrary to the contractual terms he agreed to in the deal, according to the suit.

Musk made an agreement last month to purchase the social media company for $44 billion, but has since publicly complained about it. He has challenged the number of accounts that have less than 5% of them. At a tech conference earlier this month, Musk speculated that the percentage of fake accounts could be as high as 95 percent.

He said he was putting the purchase on hold, though he insisted he was still committed to the deal. He said a lower purchase price wasn't out of the question.

Since Musk's acquisition bid, the share price of both companies has fallen.

The company's shares closed Thursday at $39.54, 27% below Musk's offer to buy the company.

Musk used the stock of the company to finance the purchase. He has increased his personal funding by more than $6 billion and secured additional equity financing, according to regulatory filings.

Musk is accused of buying stock while talking to company board members and failing to tell the SEC that he had acquired a 5% stake in the company. The SEC sent a letter to Musk asking for an explanation for missing the deadline.

Musk has not issued a statement on the lawsuit.