When President George W. Bush overhauled immigration rules after the attacks on Sept. 11, 2001, he received broad public support, bipartisan backing in Congress and a cooperative judiciary. The U.S. was a country genuinely fearful of more terrorism.
Contrast that moment with President Trump's temporary immigration freeze, which shares similarities with Bush's actions. Yet Trump's executive order has inspired widespread protests, congressional opposition and multiple legal challenges, including Thursday's defeat in a federal appeals court.
Why the radically different response today?
By most yardsticks, the U.S. has been largely successful in preventing terrorist attacks at home for the past 15 years, and a president invoking national security must now clear a much higher bar in making his case, according to many analysts.
"THE SECURITY OF OUR NATION IS AT STAKE!" Trump tweeted on Thursday night, though his administration has not cited any specific threat.
Different monitoring groups have slightly different numbers, but most say that since 2001, radicalized Muslims have carried out fewer than 10 deadly attacks, resulting in fewer than 100 deaths in the U.S. Almost all the attackers were U.S. citizens.
And among the seven mostly Muslim countries in Trump's order, no one from those nations has carried out a deadly terrorist attack in the United States in at least four decades (In a few cases, attackers from those countries caused injuries, but no deaths.).
"Right after 9/11, there was a sense, for almost everyone, that the system had failed," said Daniel Byman, a terrorism analyst at Georgetown University and the Brookings Institution.
"Now, many years later, there's a lot more [security] in place," he added. "There's a lot of skepticism when people call for dramatic new actions in the name of national security."
Bush's actions vs. Trump's order
With clouds of dust and debris still hanging over lower Manhattan, Bush closed the nation's airports on Sept. 11, halting all domestic and international air travel for two days. Regular flights then resumed, though stepped-up airport security measures were put in place, many of which still remain in effect.
More than 700 men, mostly Muslim immigrants, were rounded up nationwide and detained for months, in many cases. Most were ultimately deported for immigration violations, though none was linked to terrorism.
Men from mostly Muslim countries faced a much harder time getting visas to the U.S. However, the Bush administration did not seek an outright ban — even a temporary one — on Muslims or anyone else traveling to the United States.
A year after the attacks, the Bush administration set up a screening system that focused on men from five mostly Muslim countries — Syria, Iraq, Iran, Libya and Sudan.
The program, known as the National Security Entry-Exit Registration System, or NSEERS, was later expanded to include travelers from 24 mostly Muslim nations, as well as North Korea.
The program gave extra scrutiny to men from these countries, and they often faced lengthy questioning before boarding planes and when arriving in the U.S. A separate part of the program required men from those nations who were already living in the U.S. to check in with American authorities.
"We could not, after 9/11, find a single judge in the country who was receptive to seeing a challenge to those actions. They were all seen as justified in the name of national security," said Muzaffar Chishti of the Migration Policy Institute, which follows migration issues worldwide.
Over the next decade, government officials said the program helped uncover criminals and illegal aliens. But critics cited its high costs and pointed out that it never led to a terrorism conviction. The Obama administration first suspended, and then effectively dismantled the program.
Trump's executive order, signed on Jan. 27, has echoes of the Bush program.
The president includes the same five countries as originally targeted by the Bush administration, as well as Somalia and Yemen.
While the Bush program focused on men 16 and older, Trump is seeking a 90-day freeze on all immigrants from seven countries, a 120-day freeze on refugee admissions worldwide and an indefinite freeze on Syrian refugees.
A different mood
Although the plans have some parallels, the country's mood has changed, and the way the presidents rolled out their measures were sharply different.
"The enemy of America is not our many Muslim friends; it is not our many Arab friends. Our enemy is a radical network of terrorists, and every government that supports them," Bush told a joint session of Congress nine days after the Sept. 11 attacks.
Trump's White House insists the president's order is not a Muslim ban. However, that's what Trump called for during the presidential campaign and critics say he has created the impression his actions have at least as much to do with religion as fighting terrorism.
To measure how extensively the country's immigration system has been restructured, with an emphasis on national security, consider the Department of Homeland Security. It didn't exist in 2001, but now has 240,000 employees and a $40 billion annual budget.
DHS and many other government departments and agencies collect vast amounts of data that they share with each other – and other countries. The U.S. takes photos and fingerprints of virtually everyone arriving by air and sea and this has created one of the world's largest databases.
"We have a much more robust system of vetting people for their terrorist threats than we had on 9/11," said Chishti of the Migration Policy Institute.
As we noted, deadly terrorist attacks in the U.S. have been rare, and those carried out by foreigners exceedingly rare.
The deadliest case involving someone who slipped through the immigration system was Tashfeen Malik. Born in Pakistan and raised in Saudi Arabia, she came to the U.S. in 2014 on a fiancee visa. She and her husband, Syed Rizwan Farook, shot 14 people dead in San Bernardino, Calif., in December 2015.
Yet neither Pakistan nor Saudi Arabia is on the list of seven countries named in Trump's order. No one from these countries has carried out a fatal terrorist attack in the U.S. for many decades, possibly ever. The libertarian CATO Institute went back to 1975 and did not find any such lethal attacks.
There have been a few non-lethal attacks, most recently in Columbus, Ohio, last November, when Somali refugee Abdul Razak Artan injured 11 people in a stabbing rampage at Ohio State University before being shot dead.
"No vetting system is perfect," said Byman. "But if you look at those who have been arrested for suspicions of being linked to the Islamic State, for example, the vast majority have been American citizens."
Greg Myre is a national security correspondent. Follow him @gregmyre1.