United Airlines has hired Josh Earnest, President Barack Obama's former press secretary, as its chief communications officer and senior vice president, the airline announced Thursday morning.

"Josh is a proven leader and world-class communications strategist who has thrived when the stakes are the highest — and the margin for error is the smallest. He'll play a crucial role on our leadership team as we position our brand and this company for success," United CEO Oscar Munoz said in a press release.

Earnest and his wife, Natalie, and the couple's two children, will move to Chicago at some point this summer, United said. The airline's headquarters are based in the Illinois city, and Earnest will start on May 21.

"United Airlines is an iconic, global brand with a long history — but it's United's bright future that makes me enthusiastic about joining the team. Cutting through the noise of the modern media environment is a challenge, especially in the highly competitive airline industry," Earnest said. "United's advantage will continue to be its customer-focused core values, dedicated employees and visionary leadership team. That's the story that I am excited to tell."

The hire comes at a turbulent point in the company's recent history after multiple incidents over the past year, including the death of a dog in April, a passenger's December claim the airline gave her first-class seat away to a congresswoman, and a man who was dragged off a plane last April.

United said Earnest's two decades of working in strategic communications and representing the White House to the media during his eight-year tenure indicate he will be able to "shape the airline's public image."