President Donald Trump's "common sense" travel restrictions on foreigners from seven countries — one of his administration's signature immigration policies — faces another legal test Tuesday as the White House doubles down on its approach to thwarting terror attacks.

Should the 9th U.S. Circuit Court of Appeals, based in San Francisco, rule against the government's ban Tuesday evening, Trump has vowed to "take it through the system" and acknowledged that it could go to the Supreme Court.

However, while Trump's controversial executive order is aimed at aimed barring "foreign terrorist entry" into the United States, it wouldn't have prevented past terrorist attacks on U.S. soil, including the Sept. 11, 2001, attacks, which the president cited upon signing the order.

When he signed the order, Trump pledged to "keep radical Islamic terrorists out of the United States of America."

"We are not admitting into the country the very threats our soldiers are fighting overseas," Trump said during the swearing-in ceremony for Defense Secretary James Mattis at the Pentagon. "We only want to admit those into our country who will support our country and love deeply our people."

To be sure: The threat of terror is always evolving — particularly with the recent rise of ISIS — and the flow of terrorism-minded people over the past two decades doesn't necessarily predict where threats will originate for the next 20 years.

The executive order suspends the nation's refugee program for 120 days, bars entry of Syrian refugees indefinitely, and suspends entry of people from Iraq, Syria, Iran, Sudan, Libya, Somalia, or Yemen for 90 days.

It was Trump's first action on his polarizing campaign-trail promises to apply "extreme vetting" to incoming refugees and immigrants into the United States.

Related: Trump Administration Floats Compromise in Fight Over Travel Order

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Trump initially promised to completely ban Muslim entry to the United States, later insisting that this would simply be additional scrutiny to immigrants from nations with histories of terrorism. The order does not cite Islam as a test, but all seven nations subject to a multi-month-long band are majority Muslim.

In the face of public backlash and judicial challenges, the Trump administration has gone on the defensive.

On Monday, the White House released a list 78 attacks from September 2014 to December 2016 that the administration said news outlets failed to give the "spectacular attention they deserved." Most major news outlets in fact, had covered those incidents.

Related: Trump Claims Media Don’t Cover Terrorist Attacks; Archives Say Otherwise

Trump has also placed blame at the feet of the judges halting his executive order, tweeting that "the judge opens up our country to potential terrorists ... bad people are very happy!"

But of the 19 men principally behind the 9/11 attacks, all but four were Saudi Arabian. Two were from the United Arab Emirates, one hailed from Jordan, and leader Mohammed Atta was Egyptian.

The majority of perpetrators of recent jihadi-inspired terrorist attacks on U.S. soil — and those who were captured by U.S. authorities before carrying out a terrorist plot against Americans — have been either radicalized U.S.-born citizens or nationals of countries not included in Trump's order.

Nidal Hasan, the gunman who killed 13 people and wounded 32 others at Fort Hood, Texas; Omar Mateen, who killed 49 people at Pulse nightclub in Orlando, Florida, last year; Esteban Santiago, who's accused of killing five people at the Fort Lauderdale, Florida, airport last month; and both assailants in the 2015 attack at a cultural center in Garland, Texas, were all born in the United States.

So were Jose Padilla, who was convicted of plotting to detonate a "dirty bomb" in the United States; Narseal Batiste, the leader of a group charged with plotting to blow up the Sears Tower in Chicago in 2006; and Rezwan Ferdaus, who hoped to fly model airplanes full of explosives into Washington, D.C., landmarks in 2011.

Syed Farook, one of the two San Bernardino, California, attackers, was also U.S.-born. His wife, Tashfeen Malik, was born in Pakistan and lived in Saudi Arabia before coming to the United States on a fiancée visa. Neither Pakistan nor Saudi Arabia are explicitly included on Trump's list.

A significant share of perpetrators were born in countries not covered by Trump's order and later became naturalized U.S. citizens.

Muhammad Youssef Abdulazeez, who killed five people in a pair of shootings on military bases in Chattanooga, Tennessee, in 2015, was born in Kuwait but came with his family to the United States as an infant and later became a U.S. citizen.

Dhozkar Tsarnaev, one of the Boston Marathon bombers, was a naturalized U.S. citizen born in Chechnya. (His brother, Tamerlan, had a green card.) Naturalized U.S. citizen Faisal Shahzad, who attempted a car bombing in Times Square in New York in 2010, was born in Pakistan.

Currently, citizens of 38 mostly European countries can travel to the United States for stays of up to 90 days without visas. In 2015, an Obama-backed policy eliminated the waiver for citizens of those countries who had recently traveled to Iraq, Syria, Iran and Sudan. (Libya, Yemen and Somalia were added to the list later.)

That program came under scrutiny after it allowed the lawful U.S. entry of French citizen Zacarias Moussaoui, the 9/11 plotter who was ultimately nabbed for overstaying the 90-day limit, as well as the British "shoe bomber," Richard Reid.

Trump's new order also likely would not have prevented the granting of visas to people like Nigerian "underwear bomber" Umar Farouk AbdulMutallab or Quazi Nafis, a citizen of Bangladesh on a student visa who plotted to bomb the New York Federal Reserve Bank.

There have been U.S.-targeted terrorist attacks originating from the countries singled out by Trump's executive order.

The State Department classifies three of the nations — Iran, Sudan and Syria — as state sponsors of terrorism. Another of Trump's named nations, Somalia, was home to a number of recent terrorism suspects. Dahir Ahmed Adan, who injured 10 people in a stabbing attack in St. Cloud, Minnesota, last year, was a Somali refugee, as was Abdul Razak Ali Artan, who drove a car into a crowd at Ohio State University. So was Abdirahman Sheik Mohamud, who was charged in 2015 with trying to carry out attacks against U.S. soldiers or police.

Yemen, also on Trump's list, was the birthplace of Mohamed Rafik Naji, who plotted to stage an attack in Times Square last year. Yemeni-born Mufid Elfgeeh was charged - but not convicted - with plotting to shoot and kill members of the U.S. military, although he did plead guilty to attempting to provide material support and resources to ISIS.

Another plot that has received attention in recent days — because of Trump advisor Kellyanne Conway's erroneous statement that the plot resulted in a "massacre" — involved two Iraqi men living in Bowling Green, Kentucky. The men were sentenced in 2013 for attempting to send money and weapons to al Qaeda in Iraq, but they were not accused of planning an attack on U.S. soil.

An earlier version of this article stated that Mufid Elfgeeh pleaded guilty to plotting to shoot and kill members of the U.S. military. He was charged in the plot to kill U.S. soldiers but was not convicted, and those charges were ultimately dismissed when he pleaded guilty to attempting to provide material support and resources to ISIS.