SAN FRANCISCO – Uber and Waymo have reached a settlement in their trade secrets lawsuit, lawyers for the companies told a federal court in San Francisco Friday morning.

Under the deal, Uber will pay Waymo, which is part of Alphabet, Inc., a settlement valued by Waymo at $245 million.

According to Waymo, the settlement will be paid in Uber stock and is equal to 0.34 percent of the company’s value, which was $72 billion after its most recent fund-raising effort involving Japanese tech conglomerate Softbank.

In pretrial evidence gathering, a Waymo expert witness valued the alleged theft at nearly $2 billion. The judge in the case didn’t allow that figure into the trial.

Waymo, which was Google’s self-driving car program, had alleged its former engineer Anthony Levandowski downloaded autonomous vehicle trade secrets and took them to Uber.

A gasp could be heard in the courtroom when attorneys announced the settlement. Presiding Judge William Alsup noted after the announcement that a settlement like this, in the middle of a trial, is rare.

“We have reached an agreement with Uber that we believe will protect Waymo’s intellectual property now and into the future,”a Waymo spokesperson said in a statement.

“We are committed to working with Uber to make sure that each company develops its own technology. This includes an agreement to ensure that any Waymo confidential information is not being incorporated in Uber Advanced Technologies Group hardware and software.”

Uber CEO Dara Khosrowshahi said in a statement Friday that the company should have handled the acquisition of Otto, a self-driving truck company founded by Levandowski, differently. Khosrowshahi said Uber does not believe any trade secrets made their way to Uber, however.

“But the prospect that a couple of Waymo employees may have inappropriately solicited others to join Otto, and that they may have potentially left with Google files in their possession, in retrospect, raised some hard questions,” he wrote.