Image copyright EPA Image caption Vernon Unsworth told a court that he felt branded by Mr Musk's posts

A British cave expert has testified that he was left feeling "humiliated, ashamed" and "dirtied" after Elon Musk labelled him "pedo guy" online.

Vernon Unsworth is suing the Tesla founder for defamation.

The diver, who helped rescue 12 boys trapped in a Thai cave last year, told a Los Angeles court that comments Mr Musk made were "very hurtful".

The pair got into a public war of words after Mr Unsworth dismissed an offer of help from the billionaire.

The case of the Thai boys, members of a football team who became trapped deep inside a cave in northern Thailand, captured the world's attention in June 2018.

Mr Musk sent Tesla engineers and a small submarine to help free the boys during the Thai rescue effort - but it was never used.

Mr Unsworth later labelled it a "PR stunt" and suggested the billionaire could "stick his submarine where it hurts" during an interview with CNN.

Mr Musk - who has almost 30m Twitter followers - responded with a series of posts about Mr Unsworth including one where he labelled him "pedo guy".

Image copyright Getty Images Image caption Mr Musk was also quizzed about his wealth in court on Wednesday

Mr Unsworth's legal team have described Mr Musk's now-deleted tweet as "vile and false" and are seeking unspecified punitive damages.

US District Judge Stephen Wilson previously denied the defence's request to define Mr Unsworth as a "public figure" - meaning lawyers for Mr Unsworth do not have to prove Mr Musk acted with "actual malice" to win the case.

What did Mr Unsworth say?

Mr Unsworth, who court reporters said appeared on the verge of tears, said he felt Mr Musk had branded him a paedophile.

"It feels very raw. I feel humiliated. Ashamed. Dirtied," he told the court.

"Effectively, from day one, I was given a life sentence without parole. It hurts to talk about it," Mr Unsworth said.

He described the tweet as "very hurtful" and said the experience had left him feeling "very vulnerable" and "very isolated".

Image caption Diver Vernon Unsworth (R) helped bring top international cave rescuers to the mission, including Rob Harper (C)

The experienced cave explorer, 64, splits his time between the UK and Thailand. During the rescue, he helped recruit experienced cave divers who were instrumental in freeing the boys safely.

"I find it disgusting," Mr Unsworth said about Mr Musk's "pedo" comment. "I find it very hard to even read the word, never mind talk about."

What has Mr Musk said?

The Tesla and SpaceX founder testified across two days before Mr Unsworth took to the stand.

During his testimony he apologised again to Mr Unsworth for the tweets, while insisting he posted them "off the cuff" and not in a serious manner.

He told the court he had not expected the "pedo" tweet to be taken literally and at the time thought Mr Unsworth "was just some random creepy guy" who was "unrelated to the rescue".

Media playback is unsupported on your device Media caption How the Thai cave boys were rescued

Mr Musk's lawyer, Alex Spiro, said in his opening statements that the term "pedo guy" was a common insult in South Africa, where the billionaire grew up.

During his testimony Mr Musk also played down other tweets, which were also later deleted, including one where he replied "bet ya a signed dollar it's true" to a follower asking about the "pedo" comment.

Mr Musk also acknowledged in court that he paid $52,000 (£40,000) to a man posing as a private detective to dig up dirt about the British diver after it became clear he would be sued. The investigator turned out to be a conman, Mr Musk said.

Under questioning on Wednesday, Mr Musk estimated his net worth to be about $20bn but insisted most of his wealth was held in stock.

"Sometimes people think I have a lot of cash. I actually don't," he told the court.