Elon Musk took the stand in his defamation trial on Tuesday and justified calling a British diver who rescued a Thai youth soccer team trapped in a flooded cave last year a “pedo guy.” He told a Los Angeles court that the taunt at the center of the defamation lawsuit was just a “common insult” in reaction to a snub on national television.

The diver, Vernon Unsworth, sued Musk in September 2018 for defamation for the tweet labeling him a pedophile, which Musk sent out during an ongoing dispute about the best way to rescue a dozen soccer players and their coach from the Tham Luang Nang Non cave last year.

Musk’s lawyers claimed on Tuesday the billionaire “was hurt” and was defending himself after Unsworth belittled the mini submarine the Tesla CEO had built for the rescue last year on CNN. A month later, Musk called the diver a “child rapist” to a Buzzfeed reporter.

Musk told jurors his comments to Unsworth were a reaction to “ an unprovoked attack on what was a good-natured attempt to help the kids. ... It was wrong and insulting, so I insulted him back.”

The Tesla and SpaceX CEO eventually apologized for lashing out at Unsworth on his Twitter account, which reaches 22 million followers, claiming the insult was a “common insult” from his South African childhood.

“‘Pedo guy’ was a common insult used in South Africa when I was growing up,” Musk said in a court declaration. “It is synonymous with ‘creepy old man’ and is used to insult a person’s appearance and demeanor.”

An eight-person jury will now decide if Unsworth suffered any damages as a result of the series of insults.

Dressed in a dark suit, Musk held his hands tightly in front of him as he explained his involvement in the Thai cave rescue. The billionaire said while he thought at first his help “would not be needed,” after a Thai SEAL died during a failed rescue and an impending monsoon, he knew “if immediate action wasn’t taken, the boys would die.”

“That would be on my conscience forever. I’ve got to do something. We’ve got to try,” Musk said.

Although the mini submarine he sent to Thailand to aid in the rescue was not ultimately used, he was still upset when Unsworth claimed on CNN his efforts were nothing more than a “PR stunt,” adding he could “stick his submarine where it hurts.”

“So, he responds and throws some insults in,” Alex Spiro, Musk’s lawyer, said before noting that the diver had started the public dispute. “This case is about an argument between the two men.”

In response, he said, Musk fired back a series of “joking taunting tweets” that he later deleted. Musk told jurors he felt comfortable making the digs because Twitter is a platform where users “can assert fact, fiction, or anything that comes to mind.

But a month later, the billionaire renewed his attacks against the diver, calling him a “child rapist” in a series of emails to a Buzzfeed reporter.

“I suggest that you call people you know in Thailand, find out what’s actually going on and stop defending child rapists, you fucking asshole,” Musk was quoted as writing before alleging Unsworth moved to Thailand “for a child bride who was about 12 years old at the time.”

Musk allegedly got the information from a private investigator who had reached out to suggest the diver had “skeletons in his cupboard,” according to a September court filing by his lawyers. The court filing also states Musk paid the investigator—who had been previously convicted of fraud—$50,000 to dig into Unsworth’s past.

Unsworth’s legal team has vehemently denied the allegations, which have not been confirmed by any media outlet. In court Tuesday, Musk admitted he was quick to act, stating while he says a lot of things “not all of them have the same quality of thought...not everything can be thoughtful.”

Taylor Wilson, Unsworth’s lawyer, argued his client’s ability to help in the Thai cave rescue mission should have been one of his proudest moments after exploring that cave system for six years. Instead, he was shrouded in “shame” after Musk incorrectly labeled him as apedophile and “did not retract his worldwide accusation on Twitter.”

"Unsworth brought this lawsuit against Musk of accusing him of being a pedophile in what should have been one of the proudest moments of his life,” Wilson said, adding that legal action was the only thing his client would do.