Without the British caver Vernon Unsworth, the 12 Thai schoolboys and their football coach who were trapped in the flooded Tham Luang cave might never have been found and rescued.

An unsung hero of that spell-binding evacuation, the Lancashire-born financial broker lives close by the scene of the near-catastrophe. An experienced caver ever since his days potholing in the Yorkshire Dales, he was the first foreign rescuer on the scene and, 17 days later, one of the last to leave.

The 63-year-old’s intricate knowledge of the labyrinthine system — he knew it better than anyone, having mapped it previously — and his quick thinking in calling in international help when he realised that the Thais were struggling, proved crucial.

Yesterday, however, Mr Unsworth was embroiled in a new rescue mission — this time to save his reputation — after a reprehensible and totally false attack by the billionaire technology baron Elon Musk, who repeatedly accused him of being a paedophile.

Elon Musk (left), caver Vernon Unsworth (right) with Musk's mini-submarine and his offensive tweet

Mr Unsworth’s crime was that, during a TV interview at the weekend, he’d dared to criticise Musk, after the self-taught rocket scientist and inventor of Tesla cars complained the rescue teams had failed to use a special mini-sub he’d offered them.

The simple fact that Mr Unsworth was a British expat living in Thailand seems to have been evidence enough, as far as Musk was concerned, to use Twitter to throw the most offensive slurs imaginable at him on Sunday night.

The utterly baseless attack — which Musk has since deleted following an international outcry — started when he noted in a tweet that Mr Unsworth is an ‘expat guy who lives in Thailand’ and described that as ‘sus’ (suspicious).

Musk later made clear why it was suspicious when he said he would make a video proving that his mini-sub would have been successful, adding: ‘Sorry pedo guy, you really did ask for it.’

When another Twitter user questioned why Musk was ‘calling the guy who found the children a pedo’, Musk responded: ‘Bet ya a signed dollar it’s true.’

Mr Musk also suggested drilling a hole down to the boys using technology developed by his Boring Company

Mr Unsworth, who lives part of the year in Thailand and part in St Albans in Hertfordshire and has a 40-year-old Thai wife, yesterday said he is considering legal action.

He described himself as ‘astonished and very angry’ at Musk’s attack, adding: ‘This ain’t finished . . . I don’t know the guy, never met the guy, and don’t want to meet the guy. I believe he’s called me a paedophile. I believe people realise what sort of guy he is.’

They’re certainly starting to. Long used to basking in the acclaim he’s received as an all-round visionary and technology genius — indeed, he’s the man on whom the character of maverick superhero Tony Stark in the Iron Man films was based — Musk is proving himself to be alarmingly thin-skinned as his meteoric career has suffered setbacks of late.

Musk describes himself as a committed humanitarian, so he would have been horrified by those people — Mr Unsworth included — who suggested that his puzzling appearance at the Thai caves last week was an exercise in self-promotion.

Vernon Unsworth, a British caver, inside the staging area in the Tham Luang Forest Park in Chiang Rai Province, Thailand. He said he was ‘astonished and very angry’ at Musk’s unprovoked attack

Cave diving isn’t one of his many talents, but he does have a company that bores giant tunnels. One of his first suggestions, made through his favourite medium of Twitter, was to drill a hole down to the boys using technology developed by his Boring Company. When it became clear that it would be impossible to ensure digging in the right place, he suggested inserting a nylon tube into the caves that would inflate like a bouncy castle to form an underwater air tunnel for the boys.

That bizarre idea would surely have been thwarted by the awkward contours of the tunnels.

Musk, who also summoned a team of his engineers to Thailand, claimed the rescuers had been enthusiastic about his idea for using a ‘tiny, kid-size’ mini-sub made from a part of one of his SpaceX rockets.

His engineers had adapted it and he shared videos of it with his 22 million Twitter followers. His online fans gushed praise, but some of the rescuers regarded the sub as an unhelpful distraction for an operation that, in the end, relied not on high-tech gadgetry, but the bravery and ingenuity of the world’s top cave divers.

When Narongsak Osatanakorn, mission commander and outgoing governor of the local province, said publicly that the sub had never been a practical option, Musk took the rebuff badly.

He questioned Mr Osatanakorn’s expertise, adding that he believed the Thai official had been ‘inaccurately described as rescue chief’ and should more accurately be referred to as the ‘former Thai provincial governor’.

The mood between rescuers and the billionaire who’d dropped in was already clearly frosty when Mr Unsworth was asked about Musk by American TV channel CNN on Sunday. The bluff Northerner didn’t mince his words. ‘He can stick his submarine where it hurts,’ he said. ‘It just had absolutely no chance of working. He had no conception of what the cave passage was like.’

The 5ft 6in sub was rigid, so would not have negotiated obstacles.

Elon Musk submarine. which Mr Unsworth dismissed as ‘just a PR stunt’, noting that Musk was ‘asked to leave very quickly’ when he visited the caves

Mr Unsworth dismissed it as ‘just a PR stunt’, noting that Musk was ‘asked to leave very quickly’ when he visited the caves. It was this interview that sparked Musk’s ugliest response to date and which may well trigger a libel action against him.

Musk, a thrice-divorced father-of-six who is worth £15 billion, made his first fortune by developing PayPal, the popular online payment system.

While he can easily pay any libel damages, as a tech baron who genuinely wants to benefit humanity and the world, rather than just get obscenely rich, he should perhaps be worried about the greater damage to his reputation.

He has championed clean energy via his electric car company, Tesla, and his solar energy firm and space travel through SpaceX, developing reusable rockets with the aim of colonising Mars for the day when Earth is no longer habitable.

He’s focused on more immediate transport problems, too, such as traffic congestion in Los Angeles, and his engineers are tunnelling under LA to create a prototype underground transport network,

However, it hasn’t been plain sailing of late. Tesla is failing to meet production targets and burning through money — £5,600 every minute and possibly heading for bankruptcy this year, according to financial media company Bloomberg.

Safety at Tesla factories has been criticised and two test drivers have died in accidents involving Tesla self-driving cars.

(Tesla’s share price fell by more than 3 per cent on Monday following Musk’s attack on Mr Unsworth and the news that he had donated £29,000 to a fund dedicated to ensuring Republicans maintain control of the U.S. House of Representatives. Critics accused him of hypocrisy in campaigning for green energy and yet contributing to a party that downplays climate change.)

An exacting workaholic who often bunks down in the office, Musk cannot tolerate criticism, it increasingly seems. During a recent conference call about Tesla’s profits with market analysts, he complained their questions were boring and hung up. A month earlier, he also hung up on the chairman of the National Transportation Safety Board after an accident involving a Tesla car being driven on autopilot.

The feasibility of his tunnelling and space projects has also been criticised, while there is growing scepticism about his swashbuckling ideas. Now, the petulant Musk is accusing the media of trying to bring him down and has vowed to set up a website to monitor reporters’ reliability called Pravda (presumably realising the irony of naming it after the former Soviet Union’s official propaganda sheet).

In an interview published just last week and suggestive of at least some self-awareness of the criticism he brings upon himself, Musk pledged to be less combative on Twitter in future.

That resolve clearly didn’t last long. Perhaps the man who’s out to clean up the planet and save mankind might first like to spare us his own monstrous ego.