Los Angeles – Tesla co-founder Elon Musk said on Tuesday he did not literally call a British caver a paedophile during their infamous spat on Twitter, telling a Los Angeles federal court that he had simply defended himself from unprovoked insults.The tech billionaire told the defamation trial jury he had been "upset" when he described British diver Vernon Unsworth – who helped rescue youth soccer players trapped in a cave in Thailand – as "pedo guy" in a tweet. During the July 2018 row, Unsworth had described the 48-year-old entrepreneur's proposal to build a mini-submarine to rescue the boys as a "PR stunt"."It was an unprovoked attack on a good-natured attempt to rescue the kids," Musk, dressed in a black suit and dark tie, told the courtroom on Tuesday. "I was upset.""It was wrong and insulting and so I insulted him back," he said.Musk was questioned by Unsworth's attorney Lin Wood about comments made by the caver, who had said the custom-built device would never have fit in the cave and suggested that Musk could "stick his submarine where it hurts"."It's idiomatic, just as I was not literally meaning he was a paedophile," replied Musk.Meant no harmAsked why he failed to specifically say that Unsworth was not a paedophile in his apology, Musk said it seemed obvious to him that this was his intent."For me, that did not require any clarification ... (which) would have been worse," he said."I apologised and I say again 'I apologise Mr. Unsworth'," he added, as the British caver looked on across the courtroom, visibly uncomfortable under the media spotlight.Musk's testimony was to continue on Wednesday.His attorney Alex Spiro earlier on Tuesday told the jury of six women and two men that his client meant no harm when he hit out at Unsworth and that his words were spoken in anger."The tweets are not allegations of crimes. They are joking, taunting tweets in a fight between two men," Spiro told the court.He also repeated his clients' claim that "pedo guy" was a common insult in South Africa, where Musk grew up."Pedo guy (means) creepy old guy" in South Africa, Spiro said.'Disgusting'Unsworth's attorneys have challenged Musk's defence, presenting as evidence another tweet he wrote in response to a question about whether he thought the British caver was a paedophile."Bet ya a signed dollar it's true," Musk tweeted at the time.The Tesla and SpaceX CEO also said in court filings that following his spat with Unsworth, one of his aides had hired a private investigator to dig up dirt on the 64-year-old caver.He also suggested in emails to the website BuzzFeed News that Unsworth was a "child rapist".Wood has dismissed Musk's unsubstantiated claims as "disgusting" and an attempt to smear his client's reputation.He said he looks forward to seeing "how a jury reacts to (Musk's) defence strategy" under oath.Unsworth, who lives in Britain and Thailand, is expected to give his version of events when he testifies in the trial set to last through Friday.He is seeking unspecified damages for pain, suffering and emotional distress.Musk had sought to have the case dismissed, but a judge in October rejected the request.The judge also rejected a bid to classify Unsworth as a public figure, which would have made defamation harder to prove.