SAN FANCISCO – Elon Musk’s former chief of staff on Wednesday testified that the billionaire believed he had a “handshake deal” to take Tesla private in 2018 shortly before he tweeted he had the financing for an aborted buyout that is still haunting him in a high-profile trial.

Sam Teller, who worked closely Musk from 2014 to 2019, detailed a series of meetings that his former boss held with representatives from Saudi Arabia’s Public Investment Fund. His remarks came during testimony that also shed light on the quirks of a billionaire who runs Tesla, rocket ship maker SpaceX and Twitter.

Among other things, Teller said he sometimes had to “soften” Musk’s blunt emails. Teller attributed Musk’s brusque manner to Asperger’s syndrome, a form of autism that Musk acknowledged having during a May 2021 television appearance hosting “Saturday Night Live.”

Elon Musk on trial over Tesla tweets: ‘I had no ill motive’

Teller’s testimony came on the ninth day of a trial triggered by a class-action lawsuit filed on behalf of Tesla shareholders alleging Musk misled them with tweets in August 2018. In the tweets, Musk indicated he had locked up the money to lead a buyout of the electric automaker, ending its then eight-year history as a publicly held company. The case is scheduled to be turned over to the nine-person jury Friday.

Musk, 51, spent much of his roughly eight hours on the witness stand earlier in the trial maintaining he had a valid reason for disclosing he had “ funding secured” for a Tesla buyout in an Aug. 7, 2018 tweet at $420 deal — a price that valued the electric automaker at $72 billion at that time.

Teller was summoned to the stand Wednesday by Musk’s lawyers in an attempt to substantiate and elaborate upon the billionaire’s testimony.

Who is the real Elon Musk? Lawyers present different opinions as trial over Tesla tweets begins