The "hostile" immigration policy devised by Theresa May during her time as Home Secretary was regarded as "almost like Nazi Germany" by some ministers, the former head of the civil service has said.
Lord Kerslake claims that concerns were voiced within government after the policy was announced in 2014.
He added that the strategy was a "very contested piece of legislation" that some ministers were "deeply unhappy" with.
"Now, I can't say, and shouldn't say, as the former head of the civil service, precisely who gave what advice to whom. But, what I can tell you, it was highly contested and there were some who saw it, I shan't name them, as almost reminiscent of Nazi Germany in the way it's working," he said.
Asked if he was referring to people in the civil service, Lord Kerslake said: "No, some in the ministers were deeply unhappy."
Speaking on BBC 2's Newsnight, Lord Kerslake criticised the way the Windrush controversy was being handled, calling Amber Rudd's attempt to blame the situation on the civil service "completely ridiculous".
“You cannot create a climate and then not expect it to have consequences,” he said.
This comes after the government issued an apology to Windrush migrants who came to the UK from the West Indies before 1973.
Environment Secretary Michael Gove has refuted these comparisons.
Speaking to BBC Radio 4's Today programme, he said:
"I have never heard anyone make that comparison before Lord Kerslake did.
"It is not for me to criticise a distinguished former public servant like Lord Kerslake, but I respectfully disagree."
Mr Gove went on to praise Home Secretary Amber Rudd's response to the Windrush scandal after many were wrongly threatened with deportation.
"I think the gracious way in which she apologised to those affected was a model of how a politician should react to a situation like this," he added.