Tech entrepreneur Elon Musk has apologised to a British cave diver he called "pedo guy" in a row over the cave rescue in northern Thailand.
He said he had "spoken in anger" after Vern Unsworth ridiculed a mini-submarine he had commissioned for the rescue effort as a "PR stunt".
"His actions against me do not justify my actions against him, and for that I apologise," Mr Musk said.
Mr Unsworth has said he may sue for being called a "paedophile".
Thai Cave Rescue: British diver Vern Unsworth has told 7 News' @MyleeHogan that he's considering legal action after being referred to as 'pedo guy' by @elonmusk. "It's not finished...I believe he's called me a 'paedophile'...I think people realise what sort of guy he is." #7News pic.twitter.com/jzVUAtraun— 7 News Sydney (@7NewsSydney) July 16, 2018
Twelve boys and their football coach were rescued from deep within a cave earlier this month after being trapped for more than two weeks.
Mr Unsworth's knowledge of the cave complex is said to have played a key role in the rescue effort.
He travelled into the caves in the first days after the boys went missing and helped bring in top international cave rescue experts for the mission.
Mr Musk, head of the SpaceX and Tesla companies, visited the command centre in Thailand during the rescue, announcing he had left the rescuers a mini-submarine.
Just returned from Cave 3. Mini-sub is ready if needed. It is made of rocket parts & named Wild Boar after kids’ soccer team. Leaving here in case it may be useful in the future. Thailand is so beautiful. pic.twitter.com/EHNh8ydaTT— Elon Musk (@elonmusk) July 9, 2018
What did Musk say?
In a reply to another user on Twitter on Wednesday, referring to an article about his involvement in the rescue mission, he wrote that he was apologising to both Mr Unsworth and the companies he led.
"The fault is mine and mine alone," he declared.
At the same time, he accused Mr Unsworth of telling "untruths" about his mini-submarine, which was not used in the rescue.
As this well-written article suggests, my words were spoken in anger after Mr. Unsworth said several untruths & suggested I engage in a sexual act with the mini-sub, which had been built as an act of kindness & according to specifications from the dive team leader.— Elon Musk (@elonmusk) July 18, 2018
Nonetheless, his actions against me do not justify my actions against him, and for that I apologize to Mr. Unsworth and to the companies I represent as leader. The fault is mine and mine alone.— Elon Musk (@elonmusk) July 18, 2018
How did the row erupt?
The entrepreneur fired back with a tweet where, without using Mr Unsworth's name, he referred to a "British expat guy who lives in Thailand".
He said he would make a video showing the mini-sub making it deep inside the cave "no problemo", adding, "Sorry pedo guy, you really did ask for it."
The tweet, sent to his more than 22 million followers, was later deleted.
No charges or complaints had ever been filed against Mr Unsworth, Reuters news agency quoted an unnamed police officer in Thailand's Chiang Rai area as saying.
Separately, Mr Musk attacked the Thai official in charge of the command centre, Narongsak Osotthanakorn, for saying the mini-sub had been "not practical", though "technologically sophisticated".
Mr Musk said Mr Osotthanakorn had been "described inaccurately as 'rescue chief'" and was "not the subject matter expert".
How did the cave drama unfold?
The boys, aged 11 to 16, and their 25-year-old coach became trapped by floodwater while exploring the Tham Luang cave system on 23 June.
Cut off from the outside world, they were not found by divers until 2 July and a complex rescue operation ensued, during which one diver lost his life.
The 13 were finally extracted in groups over three days, the last emerging on 10 July.
Mr Musk visited the scene when it was still unclear whether divers on their own would be able to bring out the boys.
He tweeted an email from Richard Stanton - one of two British caving experts called in to front the rescue - who had urged the business leader to build the capsule as quickly as possible.
What other controversies have involved Musk?
The entrepreneur has been likened in the past to a genius behaving like a playground bully.
A leaked work email shows he advised Tesla staff to keep big meetings "very short" and to walk out of a meeting or end a phone call if it was failing to serve a useful purpose.
More bizarrely, last month he scrapped on Twitter over rights to an image of a farting unicorn, before dismissing the row as "kinda lame".