For weeks, Tesla CEO Elon Musk has been spoiling for a legal fight with Vernon Unsworth, the British cave explorer who played a key role in rescuing a dozen teenagers and their coach from a flooded cave in Thailand.

After Unsworth criticized the "submarine" Musk built to help with the rescue effort, Musk responded by calling Unsworth a pedophile—without a shred of evidence. Unsworth then threatened to sue Musk for defamation.

"I fucking hope he sues me," Musk said in an email to a Buzzfeed News reporter in late August.

Now Musk is getting his wish: Unsworth has sued Musk for defamation in Los Angeles court. He is asking for damages of at least $75,000—and possibly much more.

“Sorry, pedo guy”

Back in July, engineers working for Musk built a miniature submarine they hoped would be helpful to the rescue effort. The device turned out to be unnecessary; the rescue was nearly complete before Musk could get the sub to Thailand.

And Unsworth told CNN that the device had "absolutely no chance of working," even if it had arrived on time. It was too long and rigid to go around corners, he said. Unsworth added that Musk could "stick his submarine where it hurts."

That apparently angered Musk, who vowed on Twitter to demonstrate that the submarine could be maneuvered through the cave. "Sorry pedo guy, you really did ask for it," he tweeted.

When someone asked if he really meant to suggest Unsworth was a pedophile, Musk responded with "Bet ya a signed dollar it's true."

Musk apologized for this tweet a few days later, but his actions in the following weeks belied his apology. "You don't think it's strange he hasn't sued me?" he asked on Twitter in late August.

Days later, Musk responded to a Buzzfeed News inquiry with a series of emails that included several more defamatory claims against Unsworth:

He's an old, single white guy from England who has been traveling to or living in Thailand for 30 or 40 years, mostly Pattaya Beach, until moving to Chiang Rai for a child bride who was about 12 years old at the time. There's only one reason people go to Pattaya Beach. It isn't where you go for caves, but it is where you'd go for something else. Chiang Rai is renowned for child sex-trafficking.

"I fucking hope he sues me," Musk added. Musk put "off the record" at the top of the email, but Buzzfeed chose to publish it anyway since the publication had not actually agreed to treat the email is if it were off the record.

Unsworth says that almost every word of Musk's email is false: he first went to Thailand in 2011, not 30 or 40 years ago. He says he has never been to Pattaya Beach. Most important, Unsworth says he has never been involved in child sex-trafficking (or adult sex-trafficking) and has never taken an under-aged bride. He met his Thai wife when she was in her 30s.

Musk will now get a chance to prove his accusations against Unsworth—something he seemingly hasn't even tried to do yet. If he can't, he could wind up owing Unsworth a lot of money.

We've asked Tesla's PR team for comment and will update if we hear back.

Correction: I initially described Unsworth as a diver, but his complaint only describes him as a caver, not a diver. I've changed the headline and first sentence accordingly.