Tech entrepreneur and Tesla Inc founder Elon Musk has apologised to a British cave diver Vern Unsworth for comments he made on twitter calling him a "pedo guy" in a row over the cave rescue of a dozen schoolboys and their football coach in Thailand.

"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 in a tweet. "The fault is mine and mine alone."

Mr Unsworth, who played a vital part of the rescue operation and was a part of the team which first discovered the boys after days of searching, had said in a post-rescue interview that Elon Musk's efforts to assist the operation as a "PR stunt" while ridiculing the mini-submarine Musk had commissioned for the rescue effort.

Musk's reaction to Unsworth's was followed by the British diver telling reporters reporters on Monday he was considering legal action.