Elon Musk has apologized for a vicious attack on a British diver who helped rescue a group of boys from a Thai cave, saying his words were “spoken in anger.”

Over the weekend, the Tesla Inc. TSLA, +4.06%  CEO branded Vern Unsworth a “pedo,” or pedophile, after the diving expert criticized Musk’s bid to help the rescue by sending in a mini-submarine. Unsworth described Musk’s offer as a PR stunt that had no chance of working.

“My words were spoken in anger after Mr. Unsworth said several untruths & suggested I engage in a sexual act with the mini-sub, which had been built as an act of kindness & according to specifications from the dive team leader,” Musk wrote in a tweet, posted Wednesday in reply to another Twitter user.

“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.”

Unsworth, who played a key part in the rescue of 12 boys and their soccer coach, is aware of the apology, according to a Reuters report. But he declined to comment on whether he would still consider pursuing legal action against Musk over the abuse, which he has reportedly described as an attack on the entire rescue crew.

Tesla’s shares dropped 3% Monday, after Musk’s Twitter tirade. But they rallied 4% Tuesday, and the stock was roughly flat in premarket action on Wednesday. Tesla’s stock is down about 2% over the past 12 months, while the S&P 500 SPX, +0.40% is up 14%.