Elon Musk has apologized for calling one of the men involved in the Thai cave rescue mission a "pedo," or pedophile.

The Tesla (TSLA) CEO has faced an intense backlash over the unfounded claim against Vernon Unsworth, an expert caver who participated in the rescue mission that saved 12 boys and their soccer coach from a flooded cave in Thailand.

Musk expressed remorse on Twitter.

The executive said that while Unsworth provoked him, "his actions against me do not justify my actions against him, and for that I apologize to Mr. Unsworth and to the companies I represent as leader. The fault is mine and mine alone."

Nonetheless, his actions against me do not justify my actions against him, and for that I apologize to Mr. Unsworth and to the companies I represent as leader. The fault is mine and mine alone. — Elon Musk (@elonmusk) July 18, 2018

Unsworth has said he is considering legal action against the tech billionaire.

Gene Munster, a top tech analyst and the managing partner at Loup Ventures, wrote an open letter to Musk urging him to rein in his outbursts and erratic behavior so he might "regain investor confidence."

Related: Tech analyst tells Elon Musk: Time to take a break from Twitter

"Your behavior is fueling an unhelpful perception of your leadership -— thin-skinned and short-tempered," Munster wrote in the letter posted "on behalf of investors who believe in you and your mission."

Munster went on to advise Musk to apologize, focus on achieving Tesla's mission, and "consider taking a Twitter sabbatical."

Musk appears to be ignoring that last piece of advice. His apology to Unsworth came in a two-part tweet, posted in response to another Twitter user who linked to a story defending the Tesla CEO.

The controversy began when Unsworth described Musk's attempt to help save the stranded boys with a "kid-size submarine" as a PR stunt, telling CNN that the miniature escape pod "had absolutely no chance of working."

He can "stick his submarine where it hurts," Unsworth said during the interview in Thailand.

Related: Will Elon Musk's antics hurt his businesses?

Musk replied with his unfounded smear shortly after.

Musk has a history of making outbursts on Twitter. He has also repeatedly lashed out at journalists amid critical coverage of Tesla, which has missed Model 3 production goals, lost top executives, and clashed with government investigators.

Just last week, one of Tesla's biggest investors called for the CEO to stay out of trouble.

"We think a time of quiet and peace is what is needed to work through these [production] issues," James Anderson, a partner at Tesla's fourth largest investor, Baillie Gifford & Co., said in a Bloomberg Television interview.

"I think that it would be good to just concentrate on the core task," he added.

-- Seth Fiegerman and Danielle Wiener-Bronner contributed to this report