Uber Technologies Inc. sold its self-driving car division to Aurora Innovation Inc. and took a stake in the startup, pulling back from its vision for a fleet of autonomous taxis to focus on turning a quarterly profit next year after the pandemic crushed revenue.

The deal will value Aurora at $10 billion, according to people familiar with the talks who asked not to be identified discussing private information. In exchange for investing $400 million in Aurora, Uber will get a 26% ownership stake in the company. That number increases to 40% when counting the stakes held by the employees and investors of Uber’s autonomous driving division. Uber Chief Executive Officer Dara Khosrowshahi and one other yet-to-be-named person representing Uber will join Aurora’s board.

The price tag is a comedown for Uber, whose self-driving division, Advanced Technologies Group, raised money last year at a $7.25 billion valuation. The agreement with Aurora values the unit at just $4 billion, following Uber’s investment. The deal, expected to close during the first quarter, also guarantees that when Aurora releases its self-driving vehicles, they’ll launch on Uber’s network.

By adding Uber’s self-driving car unit, Aurora will gain hundreds of engineers and access to one of the world’s largest ride-hailing networks. For Uber, which has slashed high-profile cash-burning initiatives this year in a push to turn a profit in 2021, the deal will give it a significant stake in one of Silicon Valley’s most promising autonomous driving startups.

In recent months, the unit’s long time frame and high costs concerned Uber’s investors SoftBank Group Corp., Benchmark and others, who have been privately urging Khosrowshahi to reconsider the autonomous driving strategy. During ATG’s short history, it has made progress building and testing autonomous driving systems, but also struggled amid a damaging lawsuit brought by Waymo, a tragic pedestrian fatality caused by one of its autonomous cars and the sector-wide reckoning that even the most basic self-driving vehicles will take significantly more time and money to develop than previously expected.

The deal is similar in structure to one Uber made earlier this year with Lime. Uber offloaded its cash-burning Jump bicycle division to the scooter company and invested $170 million in Lime to ensure a payout if, some day, the company becomes profitable.

Aurora and Uber announced the deal in a joint statement after markets closed Monday. The companies said the group will focus on driverless trucking first and later turn to more complicated light vehicles carrying passengers.

“It works well for both of us,” said Aurora CEO Chris Urmson. “We’re excited to have them team with us, and we’re excited to have Dara join our board.”

Aurora’s co-founders have a deep history in the self-driving industry. Urmson previously led Google’s self-driving team, which became Waymo. Chief Product Officer Sterling Anderson directed Tesla Inc.’s autopilot efforts. And Chief Technology Officer Drew Bagnell, an associate professor at Carnegie Mellon University, was part of the 2015 academic excodus  that formed the Uber’s ATG team. Bagnell left ATG to co-found Aurora.

Aurora earlier this summer expanded testing  on public roads from California and Pennsylvania to include Texas with an initial focus on completing long-haul, commercial trips instead of the more complicated urban maneuvers where there are more variables and opportunities for failure.

Having raised $765 million from investors including Index Ventures, Sequoia Capital, T. Rowe Price and Hyundai Motor Co., Aurora was valued at more than $3 billion last year, according to research firm PitchBook. Amazon.com Inc., which purchased its own self-driving startup, Zoox, earlier this year, is also an investor.

Aurora has roughly 600 employees, while Uber’s ATG group has about 1,200 employees, many of them based in Pittsburgh, long an epicenter of robotics thanks to Carnegie Mellon University.

Khosrowshahi had sold about 14% of ATG to partners SoftBank, Toyota Motor Corp. and Denso Corp. for $1 billion in 2019, but the unit was burning roughly $500 million a year and was set to exhaust funds by the end of next year, people familiar told Bloomberg this fall.

Even after combining forces, Aurora and ATG face stiff competition from more developed and better funded rivals. Waymo, which has logged tens of millions of miles in more than two dozen cities, announced earlier this year it had raised money from auto manufacturers and private equity groups to expand to new locations.

TechCruch earlier reported that Aurora and Uber were discussing a deal.