John Kelly is expected to depart his role as White House Chief of Staff by the end of the year, President Donald Trump said on Saturday, ending a tenure marked by tensions with his boss and confrontations with other key administration figures.

Kelly's departure follows several months of controversy and turmoil, and comes at a time when the president's agenda is imperiled by a midterm election in which Democrats recaptured the House of Representatives. The chief of staff vacancy is just the latest changing of the guard at the administration's highest levels, which includes the U.S. Attorney General, United Nations ambassador and Joint Chiefs of Staff.

The president announced the news on the front lawn on the White House, following days of swirling speculation around the retired Marine Corps general's exit for months amid disagreements with Trump. Nevertheless, in his brief remarks to reporters, Trump called Kelly "a great guy" and that he appreciated his service.

"We'll be announcing who will be taking John's place" over the next day or two, Trump said, en route to the annual Army-Navy football game. Vice President Mike Pence's chief of staff, Nick Ayers, is reportedly among the candidates who could succeed Kelly, but Reuters reported that the parties were still thrashing out the details.

NBC News and The New York Times reported on Saturday that Ayers was only willing to commit to an interim term through the spring, as his family is expected return to Georgia, citing people familiar with the discussions. Yet the president, eager to tamp down on the storyline of his White House in chaos, wants Ayers to stay on full time.

A general under friendly fire

Kelly succeeded Reince Priebus, the former head of the Republican Party who spent less than a year in the job.

The president's chaotic management style made the job particularly difficult for both men, as it prompted Kelly to limit access to Trump and discipline other staffers who ran afoul of his efforts to impose order. That dynamic generated friction between the retired general and his Commander in Chief, whose freewheeling style chafed against Kelly's efforts to exert control.

Kelly increasingly clashed with both national security officials and First Lady Melania Trump, NBC reported last month. Trump has reportedly shown frustration with Kelly during the chief of staff's tenure. He reportedly told staff that he would stay in the job until at least 2020, but speculation about his status picked up speed days ago, amid reports that his departure was imminent.

The retired general's resignation also comes as Trump is facing increasing pressure over high-stakes trade talks with China, an economy showing signs of shakiness for the first time since his inauguration, and the special counsel's investigation into potential ties between the Trump campaign and Russia that appears to be heating up.

The president will also have to contend with a divided Congress, as Democrats are slated to take over the House in January. Kelly isn't known as a political operator.

Once Kelly's eventual successor ascends to his or her West Wing post, that person will become Trump's third chief of staff in under two years — a turnover rate the president himself once used in chiding his predecessor, Barack Obama.