Donald Trump's second travel ban, which restricts entry into the United States by individuals from six countries and kicks in on Friday, is built on assessments from intelligence agencies the president has attacked and sometimes ignored since taking office.
The administration's second entry prohibition adds Eritrea, Kyrgyzstan, Nigeria and Myanmar to its first travel ban, which singles out individuals from five majority Muslim countries. It also restricts individuals hailing from Tanzania and Sudan from getting green cards via the visa lottery program that Mr Trump has panned.
Mr Trump's first travel ban – which the administration was forced to revamp several times – was upheld by the US Supreme Court. That gives critics like Democratic lawmakers and pro-immigrant groups little chance of taking down the second version.
Though it soon will be official US policy, the new restriction program represents the latest contradiction of the Trump presidency because it was constructed on a rationale that overwhelmingly depends on the US intelligence community.
A White House proclamation that accompanied the second ban builds a legal case and operational description of why the administration determined it is needed and how it will be implemented. That document states it is based on "improvements" to Department of Homeland Security threat assessment metrics also used to craft the first ban.
But it also was crafted with "more customized data from the United States Intelligence Community," according to the White House.
"With the benefit of two years of experience, DHS has worked closely with the Intelligence Community to define intelligence requirements and customize intelligence reporting that offers a detailed characterization of the relative risk of terrorist travel to the United States from each country in the world," states the proclamation. "This additional detail improves DHS's assessment of national security and public-safety risk."
The White House and president, then, are depending on an intelligence apparatus to justify and provide the backbone of the second ban that he has at times attacked, alienated, ignored or mocked.
During a January 9 campaign rally, the president told supporters about the US military operation that killed Qassem Soleimani, the Iranian general who commanded the country's Quds Force.
"One of our leaders, one of our really admired people said, 'Sir, we'll have them there tomorrow.' I said, 'No, get in the planes right now. Have them there immediately,'" Mr Trump claims he told senior US national security officials. "And they got there immediately."
Testimony by Fiona Hill, a former National Security Council Russia expert, and David Holmes, an official in the US embassy in the Ukrainian capital, further undercut several contentions pushed by Trump, GOP lawmakers and the president's surrogates. Hill, for instance, dismissed a conspiracy theory rejected by American intelligence agencies but espoused by Trump and other Republicans that Ukraine, not Russia, meddled in the 2016 US election.
Mr Trump also has long broken with all 16 American intelligence agencies' finding that Russia interfered in that very election with a goal of boosting his bid over that of former Secretary of State Hillary Clinton.
He angered some intel officials early in his first year when he invited a group of senior Russian officials into the Oval Office and boasted about highly classified information.
In January 2018, the president broke with his own intelligence agencies when he suggested lawmakers allow the Foreign Surveillance Intelligence Court, used in complicated terrorism cases, to expire.
"This is the act that may have been used, with the help of the discredited and phony Dossier, to so badly surveil and abuse the Trump Campaign by the previous administration and others?" he tweeted.
After an intervention with senior officials, he was forced to walk that back in a second tweet. The House and Senate soon voted to reauthorize the sometimes-controversial FISA process.
When the second ban makes it more difficult for thousands of additional people from non-white majority countries to enter the United States, he will be putting ample stock in an intelligence community two experts say he has long tried to "blind."
"These actions will undercut our spies' ability to recruit foreign sources and to convince foreign intelligence agencies to share vital secrets with us," Joshua Geltzer and Ryan Goodman wrote for Just Security. "Those foreign sources and agencies must have trust in our intelligence community, and that trust is based in large part on our government's ability to safeguard the most sensitive information obtained by it."