Elon Musk shared his July 8 email correspondence with British diver Richard Stanton on Twitter.

He told the diver that his team was developing a kid-size submarine and asked if it would be of use in the mission to rescue the Thai boys soccer team from a flooded cave in northern Thailand.

Stanton told Musk to continue production on the sub, and that it "may well be used" if the rain continued.

Tech billionaire Elon Musk shared an email correspondence he had with a British diver who took part in the Thai boy soccer team rescue mission, revealing that he pledged to continue developing his mini-submarine in hopes of saving the trapped children.

Musk's SpaceX rocket company announced over the weekend that it was testing a kid-size submarine in hopes of helping the boys trapped in a flooded cave in northern Thailand.

In a tweet posted Tuesday morning, Musk revealed his emails with Richard Stanton from July 8, in which the British diver encouraged him to continue testing the device.

Musk told Stanton that he had "one of the world's best engineering teams who normally design spaceships and spacesuits working on this thing 24 hours a day."

He added that his team was "trying to get it right in a very short period of time."

Stanton told him it was "absolutely worth continuing" production, adding that the submarine "may well be used" if the rain held out.

"We're worried about the smallest lad please keep working on the capsule details," Stanton told Musk.

Musk previously shared video of his aluminum sub being tested in a swimming pool in California.

He then traveled to Thailand, where he posted video and photos from the scene of the rescue mission.

As of Tuesday, all 12 boys from the soccer team and their 25-year-old coach had been rescued from the Tham Luang Cave in Chiang Rai.

"Great news that they made it out safely. Congratulations to an outstanding rescue team!" he tweeted in celebration on Tuesday morning. "The team did extremely well. Sub will be useful in future operations."

It was later that he shared his emails with Stanton, in a tweet in which he also claimed that a former Thai provincial governor was "inaccurately" described as a "rescue chief."

He credited Stanton, a firefighter and cave diver in his 50s, as being an expert on the subject matter.

Stanton and his diving partner, John Volanthen, were the first two to discover the soccer team and their coach trapped in the cave, The Telegraph reported on Monday.

Stanton previously led a rescue mission in Mexico in 2004, where he helped save six British soldiers who had been trapped underground for six days, according to The Washington Post.