Hours after the last teenager made it out of a cave in Thailand alive, Elon Musk started a Twitter argument over how much credit he deserved for offering to help save the kids.

The rescue efforts captured international attention for a week, after Richard Stanton and another diver found the boys, trapped by rising waters. One by one, the dozen teenage football team members and their coach were escorted out of the cave, alive. And Musk was there, with an invention he'd dreamed up on the fly and brought to the rescue site, just in case it was needed.

The invention was a kid-sized submarine, one that Narongsak Osatanakorn, the official running coordination of the rescue effort, told the Guardian was "not practical" for their mission.

CHARLES SYKES/AP Elon Musk has attracted praise and criticism for his efforts in Thailand.

And that's the quote that seemed to prompt Musk to fight online about his role in the rescue. Questioning the official's expertise, Musk said Stanton was the real expert, and offered up his email exchange with the elite diver to prove his ideas were welcome.

READ MORE:

* Thai cave rescue - full coverage

* In pictures: The Thai cave rescue

* Why Elon Musk built a mini-submarine for Thai cave rescue

* Elon Musk appears emotional as he overcomes vote to remove him from Tesla board

* What Model 3 drivers love and hate about Tesla's pivotal sedan

As disasters unfold in real time online, Musk is pioneering a new form of viral tourist: the would-be saviour who becomes a part of the narrative, whether they actually helped or not. Musk's adjacent virility in the case of the Thai soccer team has even become a meme.

AP This photo tweeted by Elon Musk showed the efforts to rescue trapped the trapped boys and their coach.

Before Musk's offer, there was was Jake Paul, a massively popular YouTuber who lives in a pit of drama. Last summer, after a month or so of controversy over his public behaviour, Paul drove from Los Angeles to Texas to save the city of Houston from the flooding that followed Hurricane Harvey. Paul collected donations - causing a minor riot in a Wal Mart parking lot - and brought jet skis to help go door to door rescuing people from their homes. Houston needed anyone who could to pitch in at that moment. It also made good vlog material. As Paul live-vlogged his rescue work, he alternatively talked about his good heart and his many haters.

"We are gonna get them supplies, we are gonna save their lives, and we're gonna flippin' vlog it all at the same time!" Paul said in one video "We're gonna flippin' rise, and we're gonna everyday-bro it, in their face."

It wasn't clear in that moment if he meant the hurricane's devastation or the people who wrote negative things about him and his fans online. The vlog left the impression that Paul was doing good to own the haters.

Musk, too, has a history of showing off his inventiveness and altruism. After Puerto Rico was devastated by Hurricane Maria, he sent Tesla batteries to the island to power 600 locations. Once, he had an idea to solve Los Angeles traffic. And before Musk built a submarine to rescue kids from caves, he'd lashed out at the media for covering his company negatively.

Among other things, Musk appeared to be upset about a Reveal News report detailing safety issues at his factories. His response included a now-viral rant in which he proposed fixing journalism by building a Yelp for Journalists, allowing the public to rate the reliability of individual reporters and outlets.

Like Paul, Musk has many haters. He's buffered from them in part by his large online following, who cheer his tweets attacking perceived enemies, and treat him like the real-life superhero he imagines himself to be.

And this is how Musk got himself involved in Thailand in the first place. One of Musk's fans tweeted him last week, imploring him to help, and Musk began a lengthy, live brainstorming process on Twitter for a way to invent a solution that the country of Thailand would be unable to create themselves.

The result was a kid-sized submarine built out of rocket parts. Musk tested his device in a Los Angeles pool, and then flew himself and the pod to the site of the caves.

In the end, his experimental submarine wasn't used, but he thought he'd leave it in Thailand just in case the country needed it later. Musk tweeted:

"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."