(Reuters) — Uber is spending millions of dollars in Toronto to open an engineering hub and expand its self-driving car operations, the strongest indication yet that the company is not retreating from autonomous vehicle development despite recent setbacks.

Chief executive Dara Khosrowshahi said on Thursday that Uber will invest more than $150 million over five years to bolster the ride-hailing company’s engineering capabilities, with a new office opening in early 2019, and expand its work in artificial intelligence. The San Francisco-based company expects to hire hundreds of new employees, boosting its overall headcount in Toronto to more than 500.

The investment will allow Uber the opportunity to expand its work on self-driving technology, an area where the company has lagged competitors. Uber opened a self-driving car research center in Toronto last year, and named University of Toronto associate professor Raquel Urtasun as head of the organization.

However, Uber’s self-driving car business stalled after one of its autonomous SUVs killed a pedestrian in Tempe, Arizona, in March. Uber quickly removed its robot cars from the road, laid off hundreds of test drivers and shuttered operations in Arizona, its autonomous testing hub.

Since the Tempe crash, Khosrowshahi, who took over Uber a year ago, has explored options that include more partnerships with companies developing autonomous cars and a potential sale of the self-driving business, sources have told Reuters. The investment in Toronto is a strong signal that Uber will continue to build its own self-driving technology, at least in the near term.

It also follows a $500 million investment from Toyota to jointly work on developing self-driving cars, providing the Uber business a badly needed boost.

However, the company still faces battles with regulators and local officials who have raised concerns over the safety of Uber’s program.

Six months after the fatal crash, Uber has not resumed testing its cars on public roads, although Khosrowshahi said he expects the company will by the end of the year after undergoing a safety overhaul.

The self-driving unit is a significant contributor to Uber’s losses, which in the second quarter were $891 million. Uber said it will not raise additional financing for the Canada investment.

The separate engineering office set to open early next year is Uber’s eighth such office outside of the United States, and will be used for building technology infrastructure for Uber’s products, such as ride-hailing and food delivery.

(Reporting by Heather Somerville; editing by Grant McCool)