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.