Elon Musk is facing legal action in three countries over his groundless claims that a British caver who helped rescue 12 boys in Thailand is a “child rapist”.

Vern Unsworth is preparing to sue the Tesla founder for defamation in London and New York after the billionaire inventor repeatedly alleged he was a paedophile in a string of attacks.

He is also understood to be considering taking the case to courts in Thailand, where libel is a criminal offence punishable with a lengthy jail term and severe financial penalties.

Mr Musk had apologised in July after labelling Mr Unsworth a “pedo guy”, a slur which came after the diver dismissed the tycoon’s offer of a mini-submarine to help save the boys’ football team trapped in cave in Chiang Rai as a “publicity stunt”.

But the entrepreneur subsequently doubled down on the allegations with multiple further attacks on Mr Unsworth, who he claimed this week had married a “child bride”, offering no evidence for the allegation.

“Just as we get a series of legal proceedings drafted, Mr Musk utters yet another libel,” Mr Unsworth’s London lawyer, Mark Stephens, told The Independent.

He dismissed Mr Musk’s allegations as “completely untrue” and said his client planned to “compendiously sue him for all the libels”.

Vern Unsworth and his girlfriend Woranan Ratrawiphukkun at an event in Bangkok to celebrate the successful cave rescue (AP)

In emails this week to a BuzzFeed News reporter who had asked for response to threat of legal action, the Tesla boss said: “I suggest that you call people you know in Thailand, find out what’s actually going on and stop defending child rapists, you f***ing asshole. He’s an old, single white guy from England who’s been travelling to or living in Thailand for 30 to 40 years, mostly Pattaya Beach, until moving to Chiang Rai for a child bride who was about 12 years old at the time.

“Chiang Rai is renowned for sex trafficking.”

He added: “I f***ing hope he sues me.”

Mr Unsworth, 63, told The Times the allegations were “100 per cent” untrue and “very hurtful”.

The financial broker added: “What he is saying is any farang [foreigner living in Thailand] is a ‘paedo guy’.”

His girlfriend Woranan Ratrawiphukkun, 40, condemned claims her partner had a child bride as “laughable”.

The couple reportedly met while Ms Ratrawiphukkun, a businesswoman, was working in the UK seven years ago and now live together in the countryside near Chiang Rai.

“Vern is a kind person,” she told the Thai website Coconuts. “He rarely has an argument with anyone, and everybody loves Vern. We’ve spent our life together for seven years — he’s a good man and such a gentleman. He thinks of others before himself.”

Thailand schoolboys rescue - in pictures Show all 21 1 /21 Thailand schoolboys rescue - in pictures Thailand schoolboys rescue - in pictures Police and military personnel use umbrellas to cover a stretcher near a helicopter and an ambulance at a military airport in Chiang Rai as rescue operations continue for those still trapped inside the cave in Khun Nam Nang Non Forest Park in the Mae Sai district. Four boys among the group of 13 trapped in a flooded Thai cave for more than a fortnight were rescued on July 8 after surviving a treacherous escape, raising hopes elite divers would also save the others soon. AFP/Getty Thailand schoolboys rescue - in pictures Thai rescue team members walk inside the cave Rex Features Thailand schoolboys rescue - in pictures An ambulance exits from the Tham Luang cave area AFP/Getty Images Thailand schoolboys rescue - in pictures A military helicopter carrying rescued schoolboys approaches to land at a military airport in Chiang Rai REUTERS Thailand schoolboys rescue - in pictures Rescuers hands locked with a caption reading "We Thai and the international teams join forces to bring the young Wild Boars home" where 12 boys and their soccer coach have been trapped since June 23 in a cave in Mae Sai, Chiang Rai province, northern Thailand. The operation has begun to rescue 12 boys and their soccer coach who will need to dive out of the flooded Thai cave where they have been trapped for more than two weeks, with officials saying Sunday morning that "today is D-Day. AP Thailand schoolboys rescue - in pictures A Thai policeman stands guard at an entrance of the cave as rescue operations continue for 12 boys and their coach trapped at Tham Luang cave at Khun Nam Nang Non Forest Park in the Mae Sai district of Chiang Rai province on early July 8, 2018. Thai authorities told media on July 8 to leave a camp site near the cave where 12 boys and their coach have been trapped for more than two weeks so that "victims" could be helped, possibly signalling a long-awaited rescue effort to get them out. AFP/Getty Images Thailand schoolboys rescue - in pictures Rescuers are seen drillining ahead of the operation at the Tham Luang cave complex, where 12 boys and their soccer coach are trapped, in the northern province of Chiang Rai, Thailand REUTERS Thailand schoolboys rescue - in pictures Rescuers are seen drillining ahead of the operation at the Tham Luang cave complex, where 12 boys and their soccer coach are trapped, in the northern province of Chiang Rai, Thailand REUTERS Thailand schoolboys rescue - in pictures Ruamkatanyu Foundation rescuers are seen drillining ahead of the operation at the Tham Luang cave complex, where 12 boys and their soccer coach are trapped, in the northern province of Chiang Rai, Thailand REUTERS Thailand schoolboys rescue - in pictures Thai policemen stand guard near a cave where 12 boys and their soccer coach have been trapped since June 23, in Mae Sai, Chiang Rai province, in northern Thailand Sunday, July 8, 2018. Thai authorities are racing to pump out water from the flooded cave before more rains are forecast to hit the northern region. AP Thailand schoolboys rescue - in pictures Journalists clear and prepare to leave the cave area during the 'D-Day' for the ongoing rescue operation for the child soccer team and their assistant coach to exit the cave at Tham Luang cave in Khun Nam Nang Non Forest Park, Chiang Rai province, Thailand, 08 July 2018. The officials' operations are underway to safely bring out the 13 members of the youth soccer team including their assistant coach who have been trapped in Tham Luang cave since 23 June 2018, out of the cave according to former Chiang Rai Governor Narongsak Osottanakorn said. EPA Thailand schoolboys rescue - in pictures Thai family members of missing football players and their coach (R) pass to meet with the officers during rescue operations to save a soccer team at Tham Luang cave in Khun Nam Nang Non Forest Park, Chiang Rai province, Thailand, 03 July 2018. According to Chiang Rai provincial Governor Narongsak Osatanakorn rescuers are taking supplies and food into the cave to sustain the team while there extraction is worked out. EPA Thailand schoolboys rescue - in pictures Rescuer walk out from cave where 12 boys and their soccer coach have been trapped since June 23, in Mae Sai, Chiang Rai province, in northern Thailand Sunday, July 8, 2018. Thai authorities are racing to pump out water from the flooded cave before more rains are forecast to hit the northern region. AP Thailand schoolboys rescue - in pictures Policeman line up on the main road leading to Tham Luang Nang Non cave on July 8, 2018 in Chiang Rai, Thailand. Divers began an effort to pull the 12 boys and their soccer coach on Sunday morning after they were found alive in the cave at northern Thailand. Videos released by the Thai Navy SEAL shows the boys, aged 11 to 16, and their 25-year-old coach are in good health in Tham Luang Nang Non cave and the challenge now will be to extract the party safely. Getty Images Thailand schoolboys rescue - in pictures Rescue workers along the main road leading to Tham Luang Nang Non cave as the first 2 ambulances carrying 2 boys pass by on July 8, 2018 in Chiang Rai, Thailand. Divers began an effort to pull the 12 boys and their soccer coach on Sunday morning after they were found alive in the cave at northern Thailand. Videos released by the Thai Navy SEAL shows the boys, aged 11 to 16, and their 25-year-old coach are in good health in Tham Luang Nang Non cave and the challenge now will be to extract the party safely. Getty Images Thailand schoolboys rescue - in pictures Thai medics and police officers evacuate the first two children with a helicopter after rescued from Tham Luang cave before heading to hospital, at a helicopter pad in Chiang Rai province, Thailand, 08 July 2018. Members of a children soccer team and their assistant coach who have been trapped in Tham Luang cave EPA Thailand schoolboys rescue - in pictures An ambulance transporting the children who have been rescued, arrives at hospital in Chiang Rai province, Thailand, 08 July 2018. The first six children have been confirmed to rescue on 08 July 2018 after have been trapped in Tham Luang cave since 23 June 2018. Four members of a children soccer team and their assistant coach who have been trapped in Tham Luang cave since 23 June 2018 have been rescued on 08 July 2018, according to former Chiang Rai Governor Narongsak Osottanakorn said. EPA Thailand schoolboys rescue - in pictures Ambulances transport boys rescued from Tham Luang Nang Non cave to hospital on July 8, 2018 in Chiang Rai, Thailand. Divers began an effort to pull the 12 boys and their soccer coach on Sunday morning after they were found alive in the cave at northern Thailand. Videos released by the Thai Navy SEAL shows the boys, aged 11 to 16, and their 25-year-old coach are in good health in Tham Luang Nang Non cave and the challenge now will be to extract the party safely. Getty Thailand schoolboys rescue - in pictures Medical staff await for the rescued Thai children at Chiang Rai Prachanukroh Hospital in Chiang Rai. The twelve missing Thai children and their adult coach went missing after entering a cave at Tham Luang, in Chian Rai Privince Thailand schoolboys rescue - in pictures Ambulances transporting children after being rescue from Tham Luang cave, arrive Chiangrai Prachanukroh Hospital in Chiang Rai province, Thailand, 08 July 2018. Six children of a child soccer team have been rescued on 08 July 2018 after 12 of them and their assistant coach have been trapped in Tham Luang cave since 23 June 2018. EPA Thailand schoolboys rescue - in pictures Ambulances transporting children after being rescue from Tham Luang cave, arrive Chiangrai Prachanukroh Hospital in Chiang Rai province, Thailand, 08 July 2018. Six children of a child soccer team have been rescued on 08 July 2018 after 12 of them and their assistant coach have been trapped in Tham Luang cave since 23 June 2018. EPA

Mr Unsworth, from St Albans, Hertfordshire, is an experienced cave diver whose intimate knowledge of the Tham Luang cavern complex proved instrumental in the success of July’s rescue.

He pinpointed the higher ground where he correctly predicted the football team and their coach had taken refuge in the caves, and put Thai authorities in touch with three experienced British divers who were the first to locate the boys.

Mr Musk travelled to the caves days into the rescue operation and presented a “kid-sized” capsule submarine he insisted could be used to carry the team to safety along a 1.5-mile network of flooded tunnel.

The chief of the rescue mission described the vessel as “not practical” for the operation, which required squeezing the boys through tight, jagged passageways and Mr Unsworth later said it had “absolutely no chance of working”.

The Briton accused Mr Musk of exploiting the rescue for publicity and told him to “stick his submarine where it hurts”, comments which appeared to infuriate the Space X founder.

Mr Unsworth and the other cave divers ate dinner with the Thai prime minister in Bangkok on Thursday, after attending an event with the schoolboys to launch a public exhibition commemorating their rescue.

“That probably tells you what the Thais think of this, because if they thought he was a sex tourist they wouldn’t be anywhere near,” said Mr Stephens.

A Thai government spokesman, Weerachon Sukhondhapatipak, said Mr Musk’s slurs were concerning as they showed the country was seen by foreigners a destination for sex tourists.

He added: “When there is this kind of perception we shouldn’t overlook it. This reflects our image, which we have to fix. We won’t blame him and say ‘Oh, he said all those bad things,’ he said. ‘We should take this information and use it to make changes.’”

If Mr Musk was convicted of libel in Thailand, he could be forced to publish full-page apologies and retractions in the country’s national newspapers each day for a month.

Mr Unsworth's lawyer, Mr Stephens admitted that a lawsuit might be "ruinous for most ordinary folk, it probably wouldn't have much of an impact on Mr Musk's financial well-being."

He added that the case was "about withdrawal of the allegations."

Mr Musk's seemingly erratic behaviour has drawn concern from Tesla investors, some of whom demanded he apologise to Mr Unsworth.