Elon Musk's lawyers have asked a judge to dismiss a defamation lawsuit by a British diver who the Tesla chief executive had labelled a "pedo guy", arguing the comments were "just imaginative attacks" protected by the US constitution's first amendment.

Key points: Musk called the rescuer "pedo guy" on Twitter and a "child rapist" in an email to a journalist

Musk called the rescuer "pedo guy" on Twitter and a "child rapist" in an email to a journalist His lawyers say the statements were simply a "schoolyard spat"

His lawyers say the statements were simply a "schoolyard spat" But Vernon Unsworth is seeking damages for what he says were defamatory comments

In a filing with the US District Court in Los Angeles, the lawyers also defended their client by saying Mr Musk posted the comments on Twitter, where participants "expect to read opinions, not facts".

Mr Musk's "over-the-top" comments came amid a "schoolyard spat on social media" and no-one could have reasonably believed they were truthful, they said.

Diver Vernon Unsworth, who helped rescue the soccer team trapped in a Thailand cave earlier this year, is suing Mr Musk for defamation over a tweet on July 15 to the CEO's 22 million followers.

Mr Musk posted the tweet without evidence and later apologised.

Despite that, he later urged a BuzzFeed News reporter in an August 30 email to investigate Mr Unsworth and "stop defending child rapists".

Mr Unsworth has said there is no truth to those allegations.

He said he became a target after rescue divers declined to use a mini-submarine offered by Mr Musk's SpaceX rocket company.

Mr Unsworth told CNN the offer was a "PR stunt" that "had absolutely no chance of working".

Elon Musk deleted tweets attacking the diver.

L Lin Wood, a lawyer for Mr Unsworth, rejected Mr Musk's defence, 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," Mr Wood said.

"I am confident the trial court will likewise reject this fanciful position."

Sorry, this video has expired 'He can stick his submarine where it hurts': British cave diver rejects Elon Musk's design

Mr Unsworth, who lives in Hertfordshire County north of London, is seeking at least $75,000 in compensatory damages plus unspecified punitive damages. A hearing is set for April 1, 2019.

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

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

He agreed to pay a $20 million fine and step aside as the California-based electric car company's chairman for three years to settle the SEC case.

Mr Musk said he would leave the device at the cave "in case it may be useful in future". ( Twitter: Elon Musk )

Reuters/ABC