Tesla CEO Elon Musk apologized after making the baseless claim that a British diver involved in the Thai cave rescue mission was a pedophile.

The apology comes after the spelunker, Vern Unsworth, who was involved in the early days of efforts to save the now-rescued boys’ soccer team, threatened legal action against the billionaire executive over the comment.

Musk said on Twitter late Tuesday that he had made the claim out of “anger” because Unsworth had criticized his idea to rescue the boys with a “mini-submarine” made out of a SpaceX rocket part.

“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,” Musk said.

“The fault is mine and mine alone.”

Tweet

Musk got involved in efforts to rescue the group of 12 boys and their soccer coach earlier this month — mere days before their rescue. The boys had gotten stuck in the flooded Tham Luang cave in Chiang Rai after venturing through it with their coach.

He and a team of engineers from SpaceX and The Boring Company brought over the vessel — a cylinder made out of the liquid oxygen transfer tube of a Falcon rocket — to Thailand, and met with government officials there about the possibility of using it to help.

But Narongsak Osottanakorn, head of the command center during the rescue, did not welcome the idea, saying the sub was “technologically sophisticated” but “not practical” with the rescue mission.

Musk then hit out at reports referring to Osottanakorn as “rescue chief,” noting that he was the former provincial governor of Chiang Rai and claiming he was not the “subject matter expert.” Osottanakorn stepped down from his role to join the initiative.