Tesla honcho Elon Musk is set to return to the witness stand Wednesday as he faces a civil trial for calling a British cave explorer a “pedo guy.”

In his first day of testimony on Tuesday afternoon, the electric-car maven said he was trying to strike back at Vernon Unsworth when he threw out the baseless epithet in a July 2018 Twitter tirade.

Unsworth was part of the team that rescued 12 boys trapped in a network of caves in Thailand last year. After Musk offered a mini-submarine to help with the mission, Unsworth told CNN he should “stick his submarine where it hurts.”

Musk said the “unprovoked” insult triggered his inflammatory tweet — but he didn’t mean to literally accuse Unsworth of diddling children.

“Just as I didn’t literally mean he was a pedophile, I’m sure he didn’t literally mean shoving a sub up my ass,” Musk testified Tuesday in Los Angeles.

Musk also indulged in some apparent self-deprecation when asked about his influence in the world, saying people have not taken his warnings about climate change seriously, reports from the courtroom say.

“I’m not sure to the degree I’m influential,” he said, according to CNBC.

But in his opening statement, Unsworth lawyer Taylor Wilson said Musk’s insult cast a shadow over the diver “in what should have been one of the proudest moments of his life.”

Unsworth’s federal lawsuit seeks damages from Musk for allegedly harming his reputation with the “pedo guy” insult. The trial is slated to last about five days in all.

US District Judge Stephen Wilson has ruled that Unsworth is not a public figure, meaning he only has to show Musk was negligent in publishing his tweet. That’s a lower standard than the “actual malice” threshold used for public figures.

With Post wires