WASHINGTON—President Donald Trump’s executive order to temporarily ban entry from seven Middle Eastern and African countries states that it is intended to “protect the American people from terrorist attacks by foreign nationals admitted to the United States.”

However, few of the dozens of plots in the U.S. during and after 2001 were attempted or carried out by suspects who came from the countries targeted under the ban.