Uber Technologies on Sunday chose Dara Khosrowshahi, the chief executive of travel company Expedia Inc, as its chief executive, according to two sources with knowledge of the matter, handing him the challenge of leading the ride-services company out of a nearly year-long crisis.

Khosrowshahi, 48, would take on the daunting task of mending Uber‘s image, repairing frayed relations among investors, rebuilding employee morale and creating a profitable business after seven years of losses.

He would also have to contend with the legacy of Travis Kalanick, Uber‘s pugnacious co-founder, who was ousted as CEO in June after shareholders representing about 40 percent of the company’s voting power signed a letter asking him to step down amid growing concern over his behavior and the behavior of senior managers under him.

The Uber board of directors has been meeting daily and deliberated on its pick for CEO throughout the weekend. A spokeswoman said on Sunday that the board had voted but was declining to disclose its choice publicly until after informing employees.

A Uber spokesman declined to comment. A representative for Expedia did not immediately respond to a request for comment.

Khosrowshahi was not known to the public to be among the top candidates for the job.

He beat out Jeff Immelt, chairman of General Electric Co and one of the finalists for the job, who said earlier on Sunday he was no longer in the running. Meg Whitman, chief executive of Hewlett Packard Enterprise, had also been a leading candidate.

Khosrowshahi, who ran Expedia for 12 years, would bring an end to a company culture built on founder control. Kalanick enjoyed sweeping authority on the board and nearly complete autonomy in running the company, a governance style that often wreaked havoc.

Uber has been embattled by allegations of sexual harassment, a lawsuit alleging trade-secrets theft, a federal criminal probe over use of software to evade city regulators, and allegations of executives mishandling the medical records of a victim who was raped by her Uber driver in India, among other controversies.

Despite the controversies, Uber is still a growing company. Last week, the company reported a 16 percent increase in ride bookings and 17 percent jump in net revenue for the second quarter over the previous period, and its losses shrank by 9 percent.

Among Khosrowshahi’s first tasks at Uber would be filling a slew of executive vacancies, including those of chief financial officer, chief operating officer and general counsel. In the absence of top leadership, Uber has been run by a 13-person committee.

Uber investor Benchmark Capital complicated the CEO search when the firm filed a lawsuit earlier this month against Kalanick to force him off the board and rescind his ability to fill two board seats. The legal salvo has divided the board and shareholders.

What role Kalanick has in the company going forward is a critical question whose answer remains unclear. Benchmark has accused Kalanick of meddling in the CEO search as part of a scheme to regain power, an accusation Kalanick has called “meritless.”

In a previous statement, Kalanick said he would support the new CEO “to guide Uber into its next phase of growth and ensure its continued success.”

The Leadership Brief. Conversations with the most influential leaders in business and tech. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.