LOS ANGELES (AP) — Tesla CEO Elon Musk will have to go to trial to defend himself for mocking a British diver as a pedophile in a verbal sparring match that unfolded last summer after the underwater rescue of youth soccer players trapped in a Thailand cave.

A federal court judge in Los Angeles set an Oct. 22 trial date in a Friday court filing that rejected Musk's attempt to dismiss a defamation lawsuit filed by British diver Vernon Unsworth.

Musk called Unsworth a "pedo" in a July 15 post on this Twitter account after Unsworth, in an interview with CNN, dismissed Musk's attempts to help rescue the soccer players as a "PR stunt." Unsworth also derided the submarine that Musk had built for a rescue mission, prompting Musk to lash back on this Twitter account, which had 22.5 million followers at the time.

Musk contended his insult was protected from legal action, but the judge overseeing the case disagreed.