McDonald's said Sunday that it has fired Chief Executive Steve Easterbrook for violating company policy by having a consensual relationship with an employee.

The company said in a release that the board determined Easterbrook "demonstrated poor judgment" by engaging in the relationship. The board voted on his dismissal on Friday.

McDonald's did not provide other details on the relationship. The company said Easterbrook would be replaced by USA President Chris Kempczinski, 51, effective immediately.

"This was a mistake," Easterbrook wrote in an email to employees. "Given the values of the company, I agree with the board that it is time for me to move on."

He will receive 26 weeks of severance and is barred from working for a competitor for two years, according to a company filing Monday.

Easterbrook, 52, became CEO of McDonald's in 2015. Before then, he was chief brand officer of McDonald's and its former head in the U.K. and northern Europe.

Working closely with Kempczinski, Easterbrook oversaw a turnaround of the company. McDonald's shares have risen 96% to $193.94 since Easterbrook took over as CEO in 2015.

"I am excited to take the reins of this incredible company and grateful for the Board's confidence in me," Kempczinski wrote in an email to employees. "I am particularly fortunate to be surrounded by such a talented team as we take this brand into the future."

Joe Erlinger, president of the international operated markets, will take over as head of McDonald's U.S. division, overseeing the chain's 14,000 restaurants in its domestic market. Prior to his current role, Erlinger led McDonald's high growth markets division.

Under Easterbrook, the company sold off many of its company-owned stores to franchisees. More than 90% of McDonald's locations are now owned by franchisees. The refranchising strategy helps McDonald's profits but has led to falling revenues as a result of accounting differences.

In the early days of the turnaround, value meals and the launch of all-day breakfast lifted sales and traffic. But the company's third-quarter earnings fell short of estimates for the first time in two years, as its latest batch of promotions failed to gain traction with U.S. consumers.

Under Easterbrook and Kempczinski's leadership, McDonald's has been renovating U.S. restaurants with upgrades like self-order kiosks and digital menu boards. The fast-food chain has struggled in the U.S. in recent years with declining traffic, but technology upgrades often lead customers to spend more.

However, U.S. franchisees have balked at the expensive renovations, leading them to create an independent franchisee group last year.

The company has also come under fire from its workers for how it handles sexual harassment in its restaurants.

"It's clear McDonald's culture is rotten from top to bottom," Fight for $15 and a Union, a fast-food workers' rights group, said in a statement. "...The company needs to be completely transparent about Easterbrook's firing and any other executive departures related to these issues."

Fight for $15 has filed several dozen complaints on behalf of McDonald's employees against the Chicago-based company.

McDonald's Chief People Officer David Fairhurst departed on Monday, the company confirmed.