Tesla CEO Elon Musk.

The dispute between Musk and the social networking company he agreed to buy is not yet public.

It wasn't clear why Musk asked the court to keep details of his countersuit confidential.

The social networking company was going to be bought by Musk for about $44 billion. There was a decline in tech stocks after Musk struck the deal.

Musk accused the company of lying about the number of accounts on its platform and denying him access to information about their handling of the accounts. The Delaware Court of Chancery sued Musk after he said he wanted to end the deal.

Musk's legal team filed a confidential countersuit in a Delaware court on Friday, which means a copy was not available to the public immediately, but a version of it could be made public in the future.

A five-day trial was set for October 17 by the judge who ruled on the case.