A British diver who helped rescue 12 young soccer players trapped in a flooded cave in Thailand is suing Tesla chief Elon Musk.
Vernon Unsworth claims Musk falsely accused him on Twitter of being a pedophile.
The lawsuit filed in Los Angeles federal court seeks more than $US75,000 in damages and a court order stopping Musk from making further allegations.
Musk called the Briton a "pedo" in a tweet to his 22.5 million followers after Unsworth criticised him in a July 13 television interview with CNN about the rescue.
The Tesla boss and SpaceX engineers built a small submarine and shipped it to Thailand to help with the rescue but the device was not used, and Unsworth called it a "PR stunt".
Musk later accused Unsworth of moving to Thailand to be with a bride who was about 12 years old.
The lawsuit alleges that Musk, apparently angered by Unsworth's remarks, began a campaign to destroy his reputation "by publishing false and heinous accusations of criminality against him to the public".
In a series of tweets on July 15, Musk, who personally delivered the submarine to the cave, wrote that he never saw Unsworth and challenged him to show a video of the final rescue.
"Sorry pedo guy, you really did ask for it," he tweeted. Later on Twitter, Musk wrote: "Bet ya a signed dollar it's true."
Elon Musk sent a "tiny kid-sized submarine" to help rescue the Thai boys trapped in a cave. Source: AAP
He later deleted the tweets and apologised after being criticised by shareholders, the lawsuit alleged, stating in a tweet that his words were "spoken in anger" and that the sub was built out of kindness according to specifications from the dive team leader.
But on August 28, Musk tweeted again, writing: "You don't think it's strange he hasn't sued me? He was offered free legal services."
The lawsuit says that with the tweet, Musk sought to tell the average reader that Unsworth's failure to sue at the time was evidence that he was a pedophile.
Two days after the August 28 tweet, Musk emailed a BuzzFeed News reporter, suggesting the reporter investigate Unsworth and "stop defending child rapists", according to the lawsuit, which is 65 pages with exhibits.
"He's an old, single white guy from England who's been travelling or living in Thailand for 30 to 40 years," Musk wrote, adding that Unsworth moved to Thailand "for a child bride who was about 12 years old at the time", according to the lawsuit.
Musk ended the email by writing: “I f**king hope he sues me.”
Then in a second email to BuzzFeed, he accused Unsworth of being a liar and said he was not on the cave dive team.
"Mr Unsworth is not a pedophile. Mr Unsworth has never engaged in an act of pedophilia. Mr Unsworth is not a child rapist," the lawsuit said, adding that Unsworth has never been married to a minor.
He has a "significant other" in Thailand, a 40-year-old woman with whom he shares a house, according to the lawsuit. He started going to Thailand in 2011, where he explored and mapped caves, the documents said.
The lawsuit explains Unsworth's role in the rescue, saying that on June 23, when the youngsters became trapped, several Thai officials called and asked him to go to the cave as soon as possible. He was the first foreign rescuer to arrive.
He recommended that the Thai government seek help from divers in the UK, and called friend and fellow diver Rob Harper.
Harper, who had just returned from exploring Thai caves with Unsworth, took two other divers, John Volanthen and Rick Stanton, to help with the rescue.
It conceded that Unsworth was not involved in the final planning stages of the rescue because he did not have enough experience to make the dive.