Elon Musk will take the stand on Tuesday in San Francisco, after telling a jury on Monday that he had locked up financial support in 2018 to take his electric car maker Tesla Inc private.

Musk is defending against claims he defrauded investors by tweeting on Aug. 7, 2018, that he had "funding secured" to take Tesla private at $420 per share, and that "investor support is confirmed."

"With SpaceX stock alone, I felt funding was secured" for the buyout, Musk told a jury on Monday, referring to the aerospace company where he is also chief executive officer.

He said later he chose not to take Tesla private due to a lack of support from some investors and a wish to avoid a lengthy process.

The trial tests Musk's penchant for taking to Twitter to air his sometimes irreverent views, and when the world's second-richest person can be held liable for crossing a line.

Tesla's stock price surged after Musk's 2018 tweets, only to fall as it became clear the buyout would not happen. Investors say they lost millions of dollars as a result.

A jury of nine will decide whether the Tesla CEO artificially inflated the company's share price by touting the buyout's prospects, and if so by how much.

Musk testified that when tweeting about the financing, he was saying "not that it will happen, but that I am thinking about it," and that it was his "opinion" that funding was secured.

In addition to saying he could have funded the deal through SpaceX, Musk testified on Monday that he met on July 31, 2018, with representatives of Saudi Arabia's sovereign wealth fund, the Public Investment Fund, at Tesla's factory in Fremont, California.

He acknowledged that a takeover price was not discussed, but said the Saudi representatives made clear they would do what it took to make a buyout happen.

Musk said the fund's governor, Yasir Al-Rumayyan, later backpedaled on the commitment to take Tesla private.

Lawyers for Al-Rumayyan did not return a request for comment.

(Reporting by Hyunjoo Jin in San Francisco and Jody Godoy in California; Editing by Noeleen Walder and Chris Reese)