Twitter has fired back at Elon Musk, accusing the world's richest person of "knowingly" breaching an agreement to buy the social media firm, days after the Tesla chief sought to back out of the $44 billion deal.

In a letter sent to Musk, dated Sunday and filed with regulators on Monday, Twitter said it had not breached its obligations under the merger agreement as indicated by Musk on Friday for looking to end the deal.

"Twitter demands that Mr Musk and the other Musk Parties comply with their obligations under the Agreement, including their obligations to use their respective reasonable best efforts to consummate and make effective the transactions contemplated by the Agreement," the letter said.

The company has planned to sue Musk to force him to complete the deal, a threat he laughed off on Monday, when he sent a series of tweets joking about Twitter and its threat to enforce the agreement in court.

Twitter is planning to file a lawsuit early this week in Delaware, people familiar with the matter told Reuters.

Twitter said in the letter that the merger agreement remained in place, adding it would take steps to close the deal.

Twitter's shares ended down 11.3% at $32.65, a 40% discount to Musk's $54.20 bid and the biggest daily percentage drop in more than 14 months.

They rebounded less than 1% in extended trading.

Tesla's shares closed down almost 7%.

Traders short selling Twitter's tumbling stock made $148 million in mark-to-market profits on Monday, while short bets against Tesla resulted in $1.3 billion in mark-to-market profits, according to S3 Partners.

"Twitter's board must contemplate the potential harm to its employee and shareholder base of any additional internal data exposed in litigation," Benchmark analyst Mark Zgutowicz said.