McDonald's lost its top human resources executive Monday, days after the company's CEO was fired for having a relationship with an employee.

The Chicago-based burger giant said the departure of Chief People Officer David Fairhurst was unrelated to the exit of President and CEO Steve Easterbrook. The British businessmen are close friends; Fairhurst was promoted to his position in 2015 after Easterbrook became CEO.

"I have decided the time has come for me to move on to my next career challenge," Fairhurst said in a statement posted on his LinkedIn page.

McDonald's announced Sunday that Easterbrook was fired for violating company policy by having a consensual relationship with an employee.

In an email to employees, Easterbrook -- who is divorced -- acknowledged the relationship and said it was a mistake.

"Given the values of the company, I agree with the board that it is time for me to move on," Easterbrook said in the email.

McDonald's would not provide details about the employee with whom Easterbrook was involved. An attorney for Easterbrook declined to answer questions.

In a filing with the U.S. Securities and Exchange Commission, McDonald's said Easterbrook will receive six months' pay but forfeit millions in unvested stock options as part of his severance agreement.

Easterbrook's 2018 compensation totalled $15.9 million. That included $1.3 million in salary and the rest in stock options and incentive payments.

Under his severance agreement, Easterbrook will be eligible for a prorated incentive payment for the 2019 fiscal year. He can also exercise stock options that have vested or will vest within three years.

At the end of 2018, Easterbrook had unvested options worth $21.8 million.

Easterbrook is also forbidden from working for a competitor for two years.

McDonald's board named Chris Kempczinski as the company's new president and CEO. Kempczinski most recently served as president of McDonald's U.S. division.

McDonald's Corp. said Monday that Kempczinski's base salary will be $1.25 million, or 58% higher than his 2018 compensation.

Analysts said Monday that Kempczinski -- who joined McDonald's from Kraft in 2015 -- will likely follow the path laid out by Easterbrook, including redesigning U.S. stores to make them more digitally savvy and testing voice-based technology at drive-thrus.

"We believe these initiatives will continue largely unchanged and Mr. Kempczinski's legacy will hinge on his ability to generate traffic growth in the U.S., which neither of his two predecessors were able to achieve," BTIG Managing Director Peter Saleh said in a note to investors.

McDonald' shares fell 3% to $187.60 in afternoon trading.