Why was Elon Musk at the Thai cave rescue?
Tech entrepreneur Elon Musk's attempt to help the Thai cave rescue mission has attracted both praise and criticism.
The SpaceX and Tesla chief posted on social media that he had visited the operation's command centre, where he said he had left a mini-submarine that had been designed to carry a trapped football team to safety.
The head of the rescue mission thanked Mr Musk for his offer.
But he said the sub could not be used.
"The equipment they brought to help us is not practical with our mission," Narongsak Osotthanakorn explained.
"Even though their equipment is technologically sophisticated, it doesn't fit with our mission to go in the cave."
Thai Navy Seals subsequently announced that all 12 boys and their coach had been brought out safely.
Mr Musk has since tweeted an email from Richard Stanton - one of two British caving experts called in to front the rescue - which had urged the business leader to build the capsule as quickly as possible.
Allow Instagram content?
Mr Musk first suggested he could help save the trapped children and their football coach on 4 July, in response to a Twitter user's suggestion that he might be able to assist the effort at the Tham Luang caves in Chiang Rai.
Two days later Mr Musk confirmed he was sending engineers from SpaceX and his Boring Company - which specialises in drilling - to Thailand.
He followed with several posts speculating about possible technical solutions to the problem. These included a proposal for an air tube that could be inflated "with air like a bouncy castle", which he suggested could let the cut-off party walk to freedom.
Mr Musk ultimately settled on turning part of one of SpaceX's Falcon rockets into a "kid-size submarine", and he posted videos of its tests online.
Allow Twitter content?
When questioned whether the craft risked blocking a tight section of the tunnel system, he replied that his engineers had built an inflatable replica of the craft, which could be used to check that this would not happen.
He added that a smaller version was also being built.
"Based on extensive cave video review and discussion with several divers who know [the] journey, SpaceX engineering is absolutely certain that mini-sub can do entire journey and demonstrate at any time," he posted.
Although the craft was not needed, Mr Musk has said that he has left the mini-sub with the Thai authorities "in case it may be useful in the future".
Allow Twitter content?
The billionaire has form with making eye-catching humanitarian acts.
Last year, he was thanked by Puerto Rico's governor for setting up a solar panel and battery system to provide power to a children's hospital in San Juan after it was hit by a hurricane.
But while his most recent intervention has won him praise from some, others have questioned his motivations and suggested he might even have been a distraction.
Allow Twitter content?
Allow Twitter content?
Allow Twitter content?
Allow Twitter content?
Allow Twitter content?
Allow Twitter content?
Allow Twitter content?
"Elon Musk is well known to have an eye for the headlines, but to be fair he only became involved after a message from one of his army of fans on Twitter," commented the BBC's technology correspondent Rory Cellan-Jones.
"The fact that his company's space technology and its much vaunted tunnelling skills proved irrelevant to the operation is a reminder that sometimes this tech superhero doesn't quite match up to the Iron Man of his fans' dreams."