The controversial "zero tolerance" immigration policy that led border officials to separate children from their parents was the brainchild of then-Attorney General Jeff Sessions and was not handed down from the White House, Chief of Staff John Kelly says.

Kelly, who steps down Wednesday after 18 months in the White House, told the Los Angeles Times the administration had no warning of Sessions' plan.

“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 said. “He surprised us.”

In discussing the partial government shutdown, Kelly said the budget impasse between the White House and Congress isn’t about just a concrete or steel wall. 

“To be honest, it’s not a wall,” Kelly told the Times. 

Kelly said he has discussed security with Immigration and Customs Enforcement agents working along the border who have made it clear that a physical barrier would help in some places but that improved technology and more people are the key. 

“The president still says ‘wall’ – oftentimes frankly he’ll say ‘barrier’ or ‘fencing,’ now he’s tended toward steel slats," Kelly said. "But we (moved away from) a solid concrete wall early on in the administration, when we asked people what they needed and where they needed it.”

He expressed empathy for illegal immigrants and declined to call their arrival an "invasion." He said he was aware of the violence and corruption of some Central American governments from which many of the immigrants flee.

The death of two immigrant children while in U.S. custody has further inflamed the debate. Trump on Saturday blamed Democrats for the deaths, saying "if we had a wall, they (immigrants) wouldn’t even try!" to enter the U.S.

“Illegal immigrants, overwhelmingly, are not bad people,” Kelly said. “I have nothing but compassion for them, the young kids.”

Kelly served in the Marines for 46 years. He retired in 2016 and soon after became Trump’s secretary of Homeland Security. He replaced Reince Priebus 18 months ago as chief of staff. Mick Mulvaney, Trump’s budget director, will be acting chief of staff.

Trump frequently talks of relying on his "gut" to make decisions, but Kelly told the Times he made sure the president had detailed information before making any decisions. And Kelly stressed that Trump never ordered him to break the law.

Kelly said if he had been ordered to do something illegal, he would have resigned. He said the job was arduous and he often clashed with Trump over policy. But he was determined to stay through the 2018 midterm elections.

“Military people don’t walk away," he told the Times.

This article originally appeared on USA TODAY: John Kelly blames Jeff Sessions for 'zero tolerance,' family separations along border