White House chief of staff John Kelly will leave at the end of the year.

WASHINGTON — White House chief of staff John Kelly will leave his job at the end of this year, President Donald Trump said on Saturday, marking the biggest in a string of changes one month after Republicans lost control of the House of Representatives in midterm elections.

Trump, speaking to reporters as he left the White House to attend the annual college football game between Army and Navy in Philadelphia, said he would name a replacement for Kelly, possibly on an interim basis, in the next day or two.

“He’s a great guy,” Trump said of Kelly, who led the Department of Homeland Security before joining the White House. “I appreciate his service very much.”

A White House official later told Reuters that Trump has been in discussions for months with Nick Ayers, an aide to Vice President Mike Pence, about becoming White House chief of staff.

Trump wants Ayers to do the job for two years, the official said. But Ayers is unable to make the commitment because of his family, including two young children, and has agreed to serve only until next spring.

The official added that Ayers had been planning to leave Pence’s office and the White House this month.

Trump brought Kelly in last year to restore order to his often chaotic White House, but has clashed repeatedly with the retired Marine Corps general in recent months. The two men were no longer on speaking terms, according to one source with direct knowledge of the situation.

Kelly’s impending departure is part of a broad overhaul designed to recalibrate Trump’s administration as it faces a new reality in Washington, with Democrats set to take control of the House in January and the 2020 presidential race gearing up next year.

Kelly, 68, had some success in restoring order to Trump’s White House after he was appointed in July 2017, but the president bristled at his style.

Their rocky relationship was highlighted in “Fear: Trump in the White House,” a book by Washington Post reporter Bob Woodward that was released in September.