Elon Musk, the billionaire chief executive of SpaceX and Tesla, has left a small submarine at the site of the Thailand cave rescue.

Despite being told by the head of the rescue operation that the submarine was not practical for the rescue mission, Musk stated he was leaving the submarine "here in case it may be useful in the future".

It is not clear if the submarine, which was built by engineers from SpaceX, is being abandoned inside of the cave system or is being stored in a facility in Thailand.

A spokesperson for General Prayut Chan, the Thai prime minister, said he was "highly appreciative" of Musk's efforts and was "very touched that Mr Musk had personally travelled to Chiang Rai Province to offer assistance, especially with his ingenious solutions."

The spokesperson added that the prime minister was very inspired by Mr Musk's kindness and genuine determination to help and support this most difficult rescue operation."

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