Uber Technologies has agreed to sell its autonomous driving business to tech startup Aurora.

Uber will be taking a stake in the startup company - which is developing its own self-driving technology.

Uber said in a statement that the company will be investing $400 million in Aurora as part of the agreement. The investment will grant Uber a 26% stake in the startup company. Uber chief executive officer Dara Khosrowshahi will join Aurora's board.

The ride-hailing service provider added that it will be merging its self-driving development team with Aurora's own team to advance the technology. Aurora is already backed by major investors such as Amazon and South Korean automotive company Hyundai.

"By adding the people and technology of Uber's Advanced Technologies Group to the incredible group we've already assembled at Aurora, we're shifting the landscape of the automated vehicle space," Aurora's co-founder and chief executive officer, Chris Urmson, said in a statement.

The sale of Uber's autonomous driving business comes after a tumultuous existence marred by accidents and a fatal crash. In 2018, Uber was placed under federal investigation following the death of a pedestrian that was struck by one of its self-driving cars.

Uber's self-driving unit also faced litigation from Google's former car unit Waymo, which accused it of misappropriating autonomous driving trade secrets.

Uber said that the decision to sell its autonomous driving unit should further streamline its operations while still allowing it to be involved in the rapidly growing self-driving auto industry.

"Simply put, Aurora will be the company best positioned to deliver the self-driving products necessary to make transportation and logistics safer, more accessible and less expensive," the company said.

Apart from acquiring its self-driving unit, Aurora has also formed a separate partnership with Uber to develop smartphone-based services related to ride-hailing.

Aurora said that the initial rollout of both its mobile-based software and self-driving technologies will be applied to long-haul trucking. It then plans to apply the technology to robotic taxis and other passenger vehicles.