Elon Musk reached out to OpenAI President Greg Brockman to explore a settlement just two days before their high-stakes trial began in Oakland federal court, according to a new court filing.

The filing, made on Sunday, reveals that when Brockman suggested both sides drop their claims, Musk allegedly responded: "By the end of this week, you and Sam will be the most hated men in America. If you insist, so it will be."

Musk is suing OpenAI, alleging its shift to a for-profit structure betrayed its original nonprofit mission to develop safe AI technology for the public good. He claims company leaders wrongfully profited from his charitable contributions.

During testimony on Thursday, Musk admitted he did not read the fine print of a 2017 term sheet related to OpenAI's restructuring, only its headline.

The SpaceX founder seeks changes to OpenAI's leadership and $150 billion in damages from OpenAI and Microsoft, one of its largest investors.

The trial before U.S. District Judge Yvonne Gonzalez Rogers in Oakland began April 28 and is expected to last several weeks, with a verdict possible by mid-May. OpenAI CEO Sam Altman, President Greg Brockman, and Microsoft CEO Satya Nadella are expected to testify later this month.