A federal judge has cleared the way for a defamation trial against Elon Musk over his comments about a British cave rescuer after rejecting key arguments from the Tesla chief.

US judge Stephen Wilson ordered a trial to begin December 3 in Los Angeles in the case that centers on Musk's tweets in a disagreement connected to the rescue of 12 boys from a cave in Thailand in July 2018.

Musk called Vernon Unsworth "pedo guy" after Unsworth, who helped with the rescue, ridiculed Musk's proposal to build a mini-submarine during the crisis as a "PR stunt."

The judge rejected Musk's argument that the term "pedo guy" was a common insult and would be seen as an opinion and not a statement of fact.

Wilson said some of Musk's subsequent statements suggested he believed the charge about Unsworth to be true, which has "created a genuine dispute over the meaning of Defendant's Tweets" that "must be resolved by a jury."

Unsworth has denied being a pedophile.

A federal judge rejected Tesla chief Elon Musk's argument that 'pedo guy' is a common insult
A federal judge rejected Tesla chief Elon Musk's argument that 'pedo guy' is a common insult AFP / Philip Pacheco

Wilson accepted aspects of Musk's argument that Unsworth was a "limited public figure" who had voluntarily injected himself into the public debate about how to save the boys.

To win a defamation case in US courts, public figures like celebrities must show actual malice on the part of the person making a false statement, as opposed to the lower standard of negligence.

But Wilson ruled Musk should not be shielded him from a defamation lawsuit because the allegation of pedophilia was not connected to the debate about how to save the boys.

"To allow criticism into every aspect of a plaintiff's life simply because he chose to get involved in a limited issue would render him an all-purpose public figure," Wilson wrote in a decision earlier this week.

"For defendant's comments to relate to Plaintiff's participation in public controversies, there must be some relationship between pedophilia and the rescue or the subs -- there is simply no credible connection here."

Alex Spiro, an attorney representing Musk, said in an email that "we look forward to the trial."