The implementation of President Donald Trump's temporary immigration ban could have been better, but the measures themselves will help keep Americans safer, said James Carafano, vice president of foreign and defense studies at conservative think tank The Heritage Foundation.
The uproar over Friday's executive order, temporarily banning entry to the U.S. by travelers from seven Muslim-majority countries, has been "all about the politics and not the substance of the programs," Carafano, who worked on Trump's transition team, told CNBC's "Squawk Box" on Tuesday.
"They knew what they were getting into when they wrote this policy. They knew everybody was going to hate them. And they did it anyway, because they thought it was the right thing to do for national security," he said.
"This was the administration trying to get ahead of what is an emergent threat that every terrorism expert in the world recognizes. And to make sure we can cut off the pipelines, so foreign fighters don't come from those seven countries to the United States," Carafano said.
The seven nations in question — Iraq, Iran, Libya, Somalia, Sudan, Syria and Yemen — were first singled out as "countries of concern" by former President Barack Obama.
"Ironically ... if you look at all of Trump's executive orders this one actually probably departs least from all the Obama policies," Carafano argued.
"It's only marginally more tough than the visa policy that Obama had for those seven countries. And on the refugee front, it's a temporary suspension to review the program," he added.
Arguments that the new administration would have had an easier time in the court of public opinion do not hold up, Carafano said. "This would have been highly controversial no matter when they rolled it out."
"To the administration's defense, I think their concern was there's a terrorist flow coming. We want to stop it. Yeah some people might be inconvenienced. We can figure that out," he said. "If someone was killed in a terrorist attack in the United States because we weren't on watch, that's a more unforgivable sin."