It’s offiicial: Uber has landed a new chief executive.

The embattled ride-hailing giant confirmed late Tuesday that Dara Khosrowshahi, former CEO of Expedia, will fill the top spot vacated by former Uber CEO Travis Kalanick.

Khosrowshahi, who was offered the top Uber job Sunday in a unanimous board decision, is expected to address employees Wednesday for the first time as he gears up to put a slew of scandals behind the company.

Khosrowshahi revealed he was moving to Uber in an email to Expedia staff.

“I have to tell you I am scared,” he wrote. “This has been one of the toughest decisions of my life.”

Indeed, earlier Tuesday, the Wall Street Journal reported that the Justice Department was investigating the company for bribing foreign officials.

“Are there difficulties? Are there complexities? Are there challenges? Absolutely, but that’s also what makes it fun,” Khosrowshahi told Bloomberg on Tuesday.

“Uber is a company that is redefining the transportation industry on a global basis; to be part of that story is something that is interesting and would be a real privilege,” he added.

Uber’s board said in a statement it was “confident that Dara is the best person to lead Uber into the future, building world-class products, transforming cities, and adding value to the lives of drivers and riders.”

Khosrowshahi’s hire puts an end to the three-month search for a replacement for Kalanick, who co-founded the company but also landed it in sexual harassment scandals, a costly legal battle with Google over trade secrets and government probes of allegations that Uber has spied on regulators and customers alike.

“I am not in this to coast,” Khosrowshahi said Tuesday. “I’m in it to get my hands dirty and build a team and do something that people will look back on with tons of satisfaction.”

Analysts have estimated that the hiring of Khosrowshahi could cost Uber as much as $200 million if it buys out his stock options from Expedia, according to securities filings.

Since Uber’s board stripped Kalanick of the CEO title in June, the company has been scrambling to clean up its act.

Earlier Tuesday, Uber disabled a controversial feature in its app that tracked users’ location for five minutes after they exited a vehicle — months after customers initially voiced complaints about the practice.

“While our efforts last fall around post-trip location were aimed at improving the user experience, our riders let us know we missed the mark,” Melanie Ensign, a spokeswoman for the company, told The Post.

“We took this feedback seriously and have been working hard to make things right.”

The company had previously said it was tracking customers in order to “improve pickups, drop-offs, customer service and to enhance safety.”