Former White House chief of staff John Kelly used his first public comments since his exit to distance himself from the Trump administration's stances on immigration and the border wall – and says he would have worked for Hillary Clinton if asked.

Kelly, a former Marine general who Trump brought into his administration as Homeland Security chief and later as his top aide, called his former position 'the least enjoyable job I’ve ever had.'

But he told a crowd at Duke University he took it out of a sense of duty after consulting with his wife.

'If Hillary Clinton had called me, I would have done it,” NBC News reported.

Former White House chief of staff John Kelly has lashed out of some of the Trump administration's immigration policies in his first public comments since his departure

CONSIDER FLEEING: Mulvaney says his advice to successor Mick Mulvaney would be 'run for it!'

Kelly, a retired Marine General, said he would have worked for Hillary Clinton had she asked him

Former Trump chief of staff John Kelly made the comments at Duke University, where he took issue with a border wall that would run the length of the country

He also took on the president's signature issue – a border wall – and questioned Trump's election eve decision to dispatch thousands of U.S. military troops to the border.

'We don’t need a wall from sea to shining sea,' said Kelly. On dispatching the guard, who were photographed stringing razor wire as Trump inveighed about a migrant caravan approaching the border: 'Generally speaking I would always look for another way to do it,' said Kelly.

He blamed former Attorney General Jeff Sessions and his 'zero tolerance' policy for leading to the child separation crisis at the border.

Kelly wouldn't comment on reports Trump intervened over his objection to grant a top level security clearance to Jared Kushner

Kelly made the comments at Duke University

And he held out understanding words for immigrants – who his former boss has targeted as potential 'rapists, 'routinely singling out violent crimes committed by border-jumpers to try to fire up opposition to illegal immigration.

'And by the way, they’re overwhelmingly not criminals. They’re people coming up here for economic purposes. I don’t blame them for that,' said Kelly.

Kelly refused to get into the latest scandal roiling Washington – reports that Trump personally intervened and overruled him in order to secure high level security clearances for daughter Ivanka Trump and son-in-law Jared Kushner.

'I couldn’t — and I’m not dodging — I couldn’t comment on that for a couple of reasons,” he told the crowd. He said his conversations with the president on the topic would be covered by executive privilege,' the New York Times reported.

He was diplomatic about the travel ban, pushed out before he was chief of staff. It got a chaotic role out and faced an immediate court fight, after Trump had called for a Muslim ban on the 2016 campaign trail, but a modified reversion remains.

The White House staff 'got a little bit maybe out in front if their skis,' said Kelly.

Trump announced in December 2018 that Kelly would be leaving, only to spend weeks trying to find a new chief of staff, finally installing former budget chief Mulvaney in an acting capacity.

Kelly says his advice for Mulvaney would be 'run for it!'

ABC News ran audio of Kelly's comments about Clinton, who enjoyed positive relations with many senior military members when she was a member of the Senate Armed Services Committee.