Elon Musk proved once again that he’s difficult to beat in court.

On Friday, a federal jury in San Francisco took just two hours to clear the Tesla Inc. chief executive officer of claims by investors that he defrauded them when he tweeted 4½ years ago that he was considering taking the company private and had "funding secured” to make the deal happen.

The outcome marked another victory for the billionaire’s go-to lawyer, Alex Spiro, in a risky trial that many high-profile executives would have avoided by reaching an out-of-court settlement.