The legal battle between Waymo and Uber recently got underway but, in a surprise move, the companies reached a settlement to end the courtroom showdown.

According to Reuters, Uber will give Waymo a $245 million stake in the company to end the legal proceedings which kicked off in San Francisco earlier this week. The figure is significantly less than what Waymo was originally seeking as the publication says the company wanted at least $1 billion last year. The report also says Waymo proposed a $500 million settlement earlier this week but that was rejected by Uber’s board on Tuesday.

While the courtroom drama began on Monday, the case dates back to 2017 when Waymo sued Uber for using its technology in their autonomous driving efforts. The case centered on Anthony Levandowski who reportedly downloaded more than 14,000 files from Google before leaving the company. He later co-founded an autonomous trucking company called Otto which was then bought by Uber.

In a lengthy statement, Uber CEO Dara Khosrowshahi said “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.”

Khosrowshahi went on to say Waymo’s owner, Alphabet, is an “important investor in Uber” but they are also competitors and won’t always agree on everything.

The executive added the company’s acquisition of Otto “could and should have been handled differently” as the prospect that former employees “may have potentially left with Google files in their possession, in retrospect, raised some hard questions.” Khosrowshahi said the company doesn’t believe any of Waymo’s trade secrets or proprietary information was used by the company but they are working to “put integrity at the core of every decision we make.”

Despite Khosrowshahi’s statement, a number of publications have raised questions about the timing of the settlement. As Engadget notes, Levandowski was scheduled to be called to the witness stand later today to discuss lidar and radar technology which Waymo had claimed was stolen.