Elon Musk, chief executive officer of Space Exploration Technologies Corp. (SpaceX) and Tesla Inc., speaks during an event at SpaceX headquarters in Hawthorne, California, U.S., on Thursday, Oct. 10, 2019.

Musk apologized for the tweet during his first day of testimony in U.S. District Court in Los Angeles on Tuesday. He also argued then, and reiterated on Wednesday, that when he wrote "pedo guy" he meant "creepy old man." Musk also argued that, essentially, Unsworth picked a fight with him.

The Tesla and SpaceX CEO made the comment Wednesday in his second day of testimony in a defamation lawsuit filed by Vernon Unsworth, the British caver whom Musk called a "pedo guy" on Twitter.

Elon Musk testified under oath he's not sure know how much he's worth.

Unsworth's attorney L. Lin Wood asked Musk on Wednesday whether Musk believed his "pedo guy" comment impacted Tesla shares. Musk said he had "received concerned notes from shareholders." The testimony ended with Wood asking about Musk's net worth. Over the objections of defense Alex Spiro, the judge allowed the question, saying "Let's give everyone a headline."

Musk testified that he didn't know his precise net worth, and the value fluctuates on a daily basis. He said he owns stock in Tesla and SpaceX and has debt against his stock but he does not have a lot of cash. Asked if $20 billion was a reasonable estimate, Musk said he didn't know, but "I think SpaceX and Tesla stock probably amount to that."

The dispute between Musk and Unsworth began in the summer of 2018, when Unsworth, a spelunker and expert diver, led the rescue of 12 boys and their soccer coach from a flooded cave in Thailand.

Before the rescue was completed, Musk had endeavored to involve himself, and employees from his companies SpaceX and Tesla, in the rescue. They created a rescue pod, or miniature submersible, that ultimately proved of no use in the rescue effort.

Musk and his team pressured Thai officials to make favorable public statements about their involvement, while the rescue was still in progress and the boys' lives were at risk.

Once the boys and their coach were safe, Unsworth was asked in an interview on CNN what he thought of Musk. He characterized Musk's efforts as a publicity stunt and said the Tesla CEO should "stick his submarine where it hurts."

In court this week, Musk contended that when he called the cave rescue hero a "pedo guy" on Twitter, he was just responding to Unsworth's "unprovoked attack," with similarly heated rhetoric, not meant as a literal accusation of pedophilia.

At one point in his testimony, Musk said: "I assume he literally didn't mean to sodomize me with a submarine. I literally didn't mean he was a pedophile."