Elon Musk has a plan.

The billionaire entrepreneur and engineers at his private spaceflight company SpaceX designed a “kid-size submarine” that they said could help with a harrowing rescue operation underway to retrieve a group of boys trapped in a flooded cave in Thailand.

It arrived on Monday night, and the mogul shared some thoughts and photos on his Twitter account:

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

Earlier on Monday, Musk shared photos and videos of the rescue pod on Twitter, including footage of engineers testing the device in a pool in Los Angeles and maneuvering the metallic pod through a simulated narrow passageway underwater.

Simulating maneuvering through a narrow passage pic.twitter.com/2z01Ut3vxJ — Elon Musk (@elonmusk) July 9, 2018

Musk said the team is working on a second, shorter version.

“Mini-sub arriving in about 17 hours,” he tweeted Sunday. “Hopefully useful. If not, perhaps it will be in a future situation.”

So far, eight members of a youth soccer team have been rescued after being trapped in the cave for more than two weeks. Four other boys on the team and their 25-year-old coach remain in the Tham Luang cave complex, which flooded from heavy monsoon rains and became sealed off.

Musk and his team have been in touch with officials in Thailand, a SpaceX spokesperson confirmed, and Musk tweeted Sunday that the sub’s design is based on feedback from dive teams assisting with the rescue operation.

The device was fashioned out of a tube for SpaceX’s Falcon 9 rocket. Musk said the sub’s aluminum shell has four ports on the front and rear to connect to oxygen tanks and weighs about 90 pounds.

Testing underwater in LA pool pic.twitter.com/CDO2mtjP2D — Elon Musk (@elonmusk) July 8, 2018

“Light enough to be carried by 2 divers, small enough to get through narrow gaps,” Musk tweeted. “Extremely robust.”

Musk added that with some modifications, “this could also work as an escape pod in space.”

Thai navy SEALs and a team of foreign divers are conducting the rescue operation, and an international team of experts, including a U.S. military team, is providing assistance.

FOLLOW NBC NEWS MACH ON TWITTER, FACEBOOK, AND INSTAGRAM.