New Delhi, April 29 -- Elon Musk testified in a federal courtroom in Oakland, California, on Tuesday, telling a jury that he conceived, named and funded OpenAI on the explicit understanding that it would never be operated for private gain, as the high-stakes legal battle between the world's richest man and OpenAI chief executive Sam Altman entered its second day of proceedings before Judge Yvonne Gonzalez Rogers. Altman and OpenAI president Greg Brockman were both present in the courtroom.

Pulling up to court in a black Cadillac, Tesla boss Elon Musk told the court that his original motivation for helping establish OpenAI was to create a nonprofit, open-source counterweight to Google, whose approach to artificial intelligence he had grow...