Uber Engineering Inc . will appoint Expedia Inc .‘s Dara Khosrowshahi to operate the global ride-hailing leviathan, two people familiar with the matter said. He’ll succeed co-founder Travis Kalanick, who led the firm to $20 billion in annual bookings before scandals forced him out.

In hiring Expedia’s chief executive officer, Uber will land a seasoned deal-maker and an outspoken critic of President Donald Trump, who’s accustomed to sparring with one of his new company’s biggest challengers, Alphabet Inc. While a spokeswoman for Uber directors confirmed that they’ve chosen a Ceo, she declined to name the person, saying the members of the commission would inform employees first. Expedia didn’t immediately respond to requests for comment.

Khosrowshahi will face a number of impediments as Uber — which has raised more than $15 billion from private investors — navigates its behavior toward a still-unscheduled initial public offering. The new top executive must grapple with the company’s lingering loss, a high-stakes trade secrets suit filed by Alphabet‘s Waymo, a tarnished brand and low morale among Uber’s more than 15,000 global employees.

Gadfly on why new CEO will struggle to solve Uber’s identity crisis .

Uber’s board gratified over the weekend for a last round of interviews with nominees and to discuss alternatives, told people familiar with the matter, who asked not to be identified because the deliberations were private. Hewlett Packard Enterprise Co . CEO Meg Whitman and General Electric Co . Chairman Jeffrey Immelt were under consideration for the job.

The board ultimately moved with a dark horse. Khosrowshahi hadn’t been named publicly as a finalist during a CEO search that was beset by leaks, boardroom infighting and a lawsuit involving two directors. He has accepted the position, people familiar with the discussions said.

Khosrowshahi, 48, is an Iran-born American who graduated from Brown University with an engineering degree. He had a stint in investment banking at Allen& Co. before joining with billionaire Barry Diller at IAC during the dot-com boom. Khosrowshahi produced an acquisition binge in online travel, expanding IAC’s Expedia with takeovers of Orbitz and HomeAway.

He’s also one of the technology industry’s most outspoken CEOs in opposition to some of President Trump’s policies. He railed against the immigration forbidding and taunted Trump on Twitter as repeatedly is inadequate to “rise to the expectations of his office” after the president’s response to protests in Charlottesville, Virginia. Uber’s long year of contentions began in January when Kalanick tried to justify his position on a Trump business council before ultimately resigning that post after customers staged a boycott.

Khosrowshahi was effective at marrying disparate firms across Expedia, many brought together through acquisitions, mentioned Woody Marshall, an investor in the on-line travel industry who has known Khosrowshahi since they were kids.” He’s been able to leverage technology in a thoughtful behavior ,” said Marshall, a general collaborator at venture capital firm TCV, which isn’t an Uber investor.” He’s the real deal. He’s not bigger than life in terms of his public appearance or public personality. He’s bigger than life in terms of culture and values .”

Under Kalanick, Uber grew into a massive global business. In the second quarter of 2017, the company lost $645 million on $1.75 billion in net revenue. During Kalanick’s nearly seven-year stint, the San Francisco-based startup achieved a $69 billion valuation, struck the partnership agreement with major automobile manufacturers, took a sizable stake in its biggest world competitor and established itself as the premier ride-hailing business in most of the developed world. Kalanick earned a kind of legendary Silicon Valley status, elbowing into the ranks of founders like Elon Musk and Jeff Bezos.

However, Kalanick, 41, cultivated a brash reputation and played a central role in many of the company’s disputes. He was caught on tape arguing with an Uber driver over pay and was tied to the company’s mishandling of medical record for an Indian woman who had been raped by an Uber driver. Kalanick helped author the company’s cultural values, which consultants described as a behavior to justify bad behavior in the agency. He also drove their purchases of the autonomous trucking startup Otto for $680 million in stock, which led to a the lawsuitfrom Alphabet.

Khosrowshahi has experience jousting with Alphabet’s Google. Expedia was among Google’s top search advertisers. But as Google began to promote more of its own travelling services, Expedia was among the companies that formally resisted the search giant’s dominance in a European Union antitrust occurrence.” We’re comfortably uncomfortable as it relates to Google ,” Khosrowshahi told Bloomberg in July.

Uber’s search for a Ceo started as a bid to discover Kalanick” leadership assist ,” a process which started in March after Bloomberg published a video of Kalanick’s verbal altercation with a motorist. It shifted focus to the top chore after Kalanick’s resignation on June 20. Uber’s other leadership needs include heads of finance and marketing, a general counsel and most independent members of the security council, including a chairwoman. Uber is being led by a 14 -person management committee alongside the eight-member board until the new CEO starts.

HPE’s Whitman gained subsistence from some Uber board members for the CEO role after presenting her eyesight for the company on Saturday. She had previously denied that she would take the job. Whitman had been an informal consultant over the years to Kalanick and Ryan Graves, the company’s longest-running executive who’s set to depart next month but will remain on the board. Benchmark, Uber’s largest venture capital benefactor, was a fan of Whitman. But Kalanick craved someone willing to bring him back as a partner, something she was unlikely to do, people familiar with the issues said. Kalanick hurled his weight behind GE’s Immelt, who was a serious contender but failed to win sufficient support from the board. He withdrew his name Sunday morning in a Twitter post.

The CEO search had been further complicated by an ongoing legal oppose between Kalanick and Benchmark. The VC firm accused the former CEO of fraud and asked a Delaware Chancery Court to strip him of control over three board seats, effectively removing him from the board. The courtroom squabble is a sticking point in a potential investment from SoftBank Group Corp ., Didi Chuxing and others that would inject at least$ 1 billion into Uber and allow a large contingent of shareholders to cash out.

In the end, the members of the commission voted unanimously for Khosrowshahi, a person very well known the issues mentioned. Investors seem to like him. Expedia’s stock is up 32 percent this year, built partly on ebullience for the company’s home-rental competitor to Airbnb Inc. At Uber, Khosrowshahi will be tasked with instilling the same sort of confidence in stockholders and whipping the business into shape for an IPO. That will involve fixing a raft of the problems that have been festering inside the company for years.