Elon Musk on Tuesday posted video and photos from inside the cave in northern Thailand where a soccer team was trapped.

Musk had expressed a desire on social media to help with rescue efforts, and he orchestrated the creation of what he called a "kid-size submarine."

In the end, the Thai authorities managed to evacuate all 13 trapped people without Musk's help.

They praised Musk's submarine but said it wasn't "practical" for their mission.

The billionaire entrepreneur Elon Musk has posted photos and video from inside the cave in northern Thailand where a Thai youth soccer team was trapped for more than two weeks.

Musk posted photos on his Twitter account at about 5 a.m. local time on Tuesday, ahead of what turned out to be the final day of operations to rescue the team.

"Just returned from Cave 3," the caption said, most likely referring to Chamber Three, a crucial part of the cave system about one-third of a mile, or half a kilometer, from the entrance. "Mini-sub is ready if needed. It is made of rocket parts & named Wild Boar after kids' soccer team."

At that point, four of the 12 members of the soccer team remained trapped inside along with their coach. All five of them were rescued by the end of the day. (You can read Business Insider's coverage of the rescue itself here.)

In another post early Tuesday, this time on Instagram, several people were seen wading through the waters of the cave with headlights guided by rope.

"Just got back from Cave 3," the caption said.

Just got back from Cave 3 A post shared by Elon Musk (@elonmusk) on Jul 9, 2018 at 2:43pm PDT Jul 9, 2018 at 2:43pm PDT

Musk had been posting on social media for days about wanting to help rescue efforts in Thailand, and Business Insider has confirmed that he traveled to the Southeast Asian country.

"Elon and the team visited the tunnel last night to assess the conditions and get further feedback on the mini-submarine, in case it was used as a backup option," Musk's company SpaceX told Business Insider on Tuesday after declining on Monday to comment on the record.

Musk is the CEO of SpaceX, Tesla, and The Boring Company. He floated a plan on Twitter on Friday designed to help rescue the boys and said engineers from his companies would travel to Thailand on Saturday. He first suggested that a tube or series of tubes could be sent through the cave network and inflated to create a tunnel for the soccer team to travel through without needing scuba gear.

He later suggested using what he described as a "kid-sized submarine," posting videos of the device on Sunday.

But Musk tweeted Sunday morning that his team of SpaceX engineers didn't actually travel to Thailand because rescue operations were already underway.

Experts who previously weighed in on Musk's proposals said his team may not be of much use because of the huge numbers of experts already working on the rescue.

"It doesn't matter how much equipment you throw at it or how many dollars you throw at it — you may be reaching the limits of the technology in this particular situation," Anmar Mirza, a coordinator with the National Cave Rescue Commission, told Slate on Saturday.

Narongsak Osatanakorn, the Thai official leading rescue operations, on Tuesday echoed expert comment on Musk's proposed technology.

"Although his technology is good and sophisticated, it's not practical for this mission," the rescue chief said.

Professional divers escorted the final four boys and their coach out of the cave on Tuesday.

Dave Mosher contributed reporting to this story.

This story has been updated with new information.