Elon Musk has asked a US judge to dismiss a lawsuit by a British diver who helped rescue a boys soccer team trapped in a Thailand cave and said Musk defamed him by calling him a paedophile and child rapist.

In a filing on Wednesday with the US district court in Los Angeles, Musk’s lawyers said their client’s comments about Vernon Unsworth were free speech protected by the US constitution’s first amendment even if they lacked any factual basis.

They also said Musk’s “over-the-top” comments came amid a “schoolyard spat on social media”, including Twitter, where participants “expect to read opinions, not facts”, and that no one could have reasonably believed they were truthful.

These statements were “just imaginative attacks; even if offensive, such speculative insults are by their nature opinion and protected by the first amendment,” the lawyers said.

Musk on 15 July called Unsworth a “pedo guy” in a tweet to more than 22 million Twitter followers, a comment for which he later apologized. He also urged a BuzzFeed News reporter in an 30 August email to investigate Unsworth and “stop defending child rapists”.

Unsworth has denied those allegations.

He said he became a target after rescue divers declined to use a mini-submarine offered by Musk’s SpaceX rocket company. Unsworth told CNN the offer was a “PR stunt” and the device would not have worked.

L Lin Wood, a lawyer for Unsworth, rejected Musk’s defense, saying it would effectively doom all lawsuits over alleged false and defamatory attacks on reputation published online.

“Mr Musk does not let the facts or well-established law get in the way of his novel but inaccurate contentions in his motion to dismiss,” Wood said on Thursday. “I am confident the trial court will likewise reject this fanciful position.“

A hearing is set for 1 April 2019.

Unsworth, who lives in Hertfordshire, north of London, sought at least $75,000 in compensatory damages plus unspecified punitive damages in his 17 September lawsuit.

The soccer team, including 12 boys and a coach, was freed from the cave on 10 July after an 18-day ordeal.

Musk has faced other litigation over his Twitter use. The US Securities and Exchange Commission (SEC) accused him of securities fraud for saying he had “secured” funding to take Tesla private for $420 a share, a big premium.

On 29 September, Musk agreed to pay a $20m fine and step aside as the Palo Alto, California-based electric car company’s chairman for three years to settle the SEC case.