Outgoing Chief of Staff John Kelly is out defending his time trying to wrangle the Trump White House. And while the disarray at the White House has long been well-documented — between public staff upheaval and reported details of Donald Trump’s TV-binging habits — Kelly is taking the rare move of lifting the veil and confirming bits of the chaos that happen behind the scenes.

In a wide-ranging exit interview with Los Angeles Times reporter Molly O’Toole, Kelly discussed his tumultuous 17 months overseeing President Trump’s White House. And while Trump has earned a reputation as a rash decision-maker who sometimes ignores the advice of his own experts, Kelly wants to make clear that it’s not because he didn’t do his job of keeping the president informed:

Kelly said he made sure that Trump had access to multiple streams of detailed information before he made a decision — even if the president says he often relies on his gut, rather than U.S. intelligence. “It’s never been: The president just wants to make a decision based on no knowledge and ignorance,” Kelly said. “You may not like his decision, but at least he was fully informed on the impact.”

Kelly was supposed to be the “adult in the room” — a highly disciplined retired Marine Corps general tasked with wrangling an understaffed administration and bringing order to a White House beset with rivalries between advisers and different agencies.

But his relationship with the president has reportedly soured in recent months. Kelly reportedly called Trump an “idiot” numerous times, according to NBC News, (Kelly says those allegations are “total BS”) and told the LA Times he continued to serve out of a sense of duty.

“Military people,” he said, “don’t walk away.”

Kelly’s replacement, Mick Mulvaney of the Office of Management and Budget, takes over the post in an acting capacity at the start of the year. Between the government shutdown and a future divided Congress, Mulvaney already has his hands full — and it’s unclear how long he’s expected to stay in the post as acting chief of staff. But Kelly’s exit provides a cautionary tale for what to expect from working with Trump.

Kelly blames Jeff Sessions for the disastrous family separation policy at the border

Though he tried to run an orderly White House for the president, some things, Kelly insisted, were outside his control. When US immigration authorities began separating young migrant children from their parents at the border last summer, Kelly says that even the White House was blindsided by the policy. He blames the fallout on Jeff Sessions, who was fired last month from his post as attorney general.

“What happened was Jeff Sessions, he was the one that instituted the zero-tolerance process on the border that resulted in both people being detained and the family separation,” Kelly told the LA Times. “He surprised us.”

The finger-pointing at Sessions is a noteworthy admission considering how the administration addressed the widespread public outcry to the policy, first by denying its existence, then blaming Democrats and past immigration laws before eventually taking ownership of the policy. Trump eventually put an end to family separation with an executive order after weeks of backlash.

But for all his reflection on the zero-tolerance policy, Kelly’s own role in the fiasco will follow his reputation. He infamously treated the prospect of children being torn from their parents with indifference, saying the kids would be put into foster care, “or whatever.”

Before joining the Trump administration, Kelly oversaw the Pentagon’s Southern Command, where he had a front-row seat to the violent conditions that are now driving mass migration out of Central America, namely in El Salvador, Honduras and Guatemala. His tenure under Trump began with heading the Department of Homeland Security, where he became the face of the administration’s immigration policies even as he personally disagreed with Trump’s aggressive stance on the issue.

Kelly emphasizes now that he has great “compassion” for immigrant children. “Illegal immigrants, overwhelmingly, are not bad people,” he told the Times, adding that many are exploited by gangs and traffickers. “I have nothing but compassion for them, the young kids.”

The interview is Kelly’s first candid account of his tenure — and first attempt to write his legacy. But much has happened under his watch since he came on as chief of staff in July 2017. And like many who left before him, it’s hard to walk away from the Trump White House untarnished.