On Friday morning, as the first week of testimony in the explosive trial was drawing to a close, the two companies announced a surprise settlement over allegations that Uber misappropriated trade secrets of Waymo, the self-driving-car unit owned by Google's parent company, Alphabet.

Uber will pay Waymo a package that includes 0.34% of Uber equity pegged to a $72 billion valuation for the ride-hailing company, according to a person familiar with the settlement. That equals about $245 million.

"We agree that Uber's acquisition of Otto could and should have been handled differently," he wrote, referring to the self-driving-technology company Uber purchased in 2016.

Khosrowshahi also said Uber was committed to ensuring the self-driving-car hardware it develops "represents just our good work" and does not include any intellectual property from Waymo.

The closely watched trial, which started earlier this week, had already seen testimony from Travis Kalanick, the Uber CEO who was ousted last year.

At issue in the case was Uber's purchase of Otto, founded by Anthony Levandowski, a former senior engineering manager at Google who's an expert in self-driving cars. Waymo accused him of taking gigabytes of files from Google when he left the company — including schematics and designs for self-driving-car hardware — that Uber intended to use for its self-driving-car program.

The dispute led to explosive headlines over the past year about the accusations against Uber and sparked debate about the appropriateness of the Silicon Valley ethos of "move fast and break things" epitomized — though not coined — by the ride-hailing firm.

"The central issues in this case remains whether or not Uber misappropriated Waymo's trade secrets, not whether Uber is an evil corporation," he said in one pretrial hearing.

The trial veered from the serious to the surreal, with a key moment coming when Kalanick took the stand.

Journalists had lined up hours in advance to hear his testimony, in which the former CEO was pressed on his confidential communications with Levandowski, including cryptic messages telling the Google employee to "burn the village." In the trial's surreal high-water mark, a clip of the legendary "greed is good" speech from the 1987 film "Wall Street" was played for the jury and the public.

Each side had 16 hours to present its case, starting with the plaintiff, Waymo, which was drawing toward the end of its argument.

The settlement means the court will not hear from several high-profile witnesses, including Larry Page, the CEO of Alphabet who founded Google, and Levandowski, who was expected to invoke his Fifth Amendment right against self-incrimination.

Travis Kalanick Anthony Levandowski

Associated Press

Here are the announcements from Uber and Waymo:

"My job as Uber's CEO is to set the course for the future of the company: innovating and growing responsibly, as well as acknowledging and correcting mistakes of the past. In doing so, I want to express regret for the actions that have caused me to write this letter.

"To our friends at Alphabet: we are partners, you are an important investor in Uber, and we share a deep belief in the power of technology to change people's lives for the better. Of course, we are also competitors. And while we won't agree on everything going forward, we agree that Uber's acquisition of Otto could and should have been handled differently.

"To our employees, in particular the great and talented people of Uber's Advanced Technologies Group: I am inspired by your passion and commitment to bringing self-driving vehicles to life. Over the last year, you've been distracted from your mission. For that I am sorry.

"There is no question that self-driving technology is crucial to the future of transportation—a future in which Uber intends to play an important role. Through that lens, the acquisition of Otto made good business sense.

"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.

"To be clear, while we do not believe that any trade secrets made their way from Waymo to Uber, nor do we believe that Uber has used any of Waymo's proprietary information in its self-driving technology, we are taking steps with Waymo to ensure our Lidar and software represents just our good work.

"While I cannot erase the past, I can commit, on behalf of every Uber employee, that we will learn from it, and it will inform our actions going forward. I've told Alphabet that the incredible people at Uber ATG are focused on ensuring that our development represents the very best of Uber's innovation and experience in self-driving technology.

"As we change the way we operate and put integrity at the core of every decision we make, we look forward to the great race to build the future. We believe that race should be fair — and one whose ultimate winners are people, cities and our environment."

Here's Waymo's statement, provided by a representative:

"We have reached an agreement with Uber that we believe will protect Waymo's intellectual property now and into the future. 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. We have always believed competition should be fueled by innovation in the labs and on the roads and we look forward to bringing fully self-driving cars to the world."

In a statement provided by a spokesperson, Travis Kalanick said that Uber would have won the overall case.

Kalanick's full statement:

“As Uber’s statement indicates, no trade secrets ever came to Uber. Our sole objective was to hire the most talented scientists and engineers to help lead the company and our cities to a driverless future. The evidence at trial overwhelmingly proved that, and had the trial proceeded to its conclusion, it is clear Uber would have prevailed,” he said.

“I remain proud of the critically important contributions Uber ATG has made to the company’s future, and I look forward to their inspired efforts becoming a reality on the roads in cities around the world.”