Members of Join MoveOn and DRUM march past the White House during a protest to shut down the existing Muslim registry program NSEERS  on Dec. 12, 2016. (Gary Cameron/Reuters)

President Trump is reportedly poised to signed an executive order to begin “extreme vetting” of immigrants and visitors to the United States. Though falling short of his infamous campaign promise of “a total and complete shutdown on Muslims entering the United States,” reports suggest that this shutdown will include a ban on visas to the United States from several Muslim-majority countries and language that appears to uniquely target Muslims.

This would not be the first time the United States has sought to restrict entry by Muslim foreigners. A recently discontinued Bush-era registration program, the National Security Entry-Exit Registration System (NSEERS), did much the same thing. Its failure to achieve its avowed goals has important lessons for Trump’s new plan.

NSEERS effectively created a registry for some Muslims, while remaining under the radar for most Americans. Male noncitizens over the age of 16 traveling to or present in the United States from 24 Arab- or Muslim-majority countries (plus North Korea) were registered. These men were required to enter the United States at designated airports — rather than those closest to their destination — to be fingerprinted, photographed and interrogated. They were also required to check in with immigration officials at regular intervals and depart only from designated airports.

For individuals already in the country, the consequences of NSEERS were severe. Men originally from the designated countries — except green-card holders or U.S. citizens — were required to report for questioning before immigration officials. This “call-in registration” or “Special Registration” sowed chaos among immigrant communities. Because the requirements did not exist when their original visas were issued, many weren’t even aware that the new registration rules applied to them.

The ensuing confusion, panic and trauma to long-standing immigrant communities was extensive. When the first registration deadline approached in December 2002, more than 400 individuals of Iranian origin in California rushing to comply with the new rules were arrested. In New York, deportations hollowed out parts of the Pakistani immigrant community. Immigration offices were not staffed to administer the program effectively, creating massive delays, with huge lines of people trying to register by published deadlines.

From 2002 to 2003, more than 83,500 men were processed through Special Registration and more than 13,700 were placed into deportation proceedings as a direct consequence of voluntarily complying with the requirements. There were reports of cases of mistaken detentions and removal proceedings. NSEERS was not just a registry. It actually multiplied the grounds for deporting men based on national origin.

The program also proved highly ineffective at its intended counterterrorism goals, yielding not a single terrorism-related prosecution over the decade it remained in place. Law enforcement experts found that the program’s broad categorical profiling required vast resources and risked confusing signal and noise.

As a result of sustained opposition and controversies about implementation, aspects of the program were suspended as early as December 2003 when “check in” requirements were dropped. But the requirement that travelers register at ports of entry and depart only from designated airports remained in place for eight more years, making travel from designated countries cumbersome and stressful. Eventually, the introduction of other programs collecting biometric information from all visitors and at all airports rendered NSEERS registration requirements duplicative. On April 28, 2011, the Department of Homeland Security announced that NSEERS had been suspended and the 25 designated countries had been delisted.

While the 2011 DHS announcement ended the application of NSEERS, its regulatory framework remained. After the 2016 election, pressure mounted on the Obama administration to fully rescind the regulations. On Nov. 21, a letter signed by 200 civil rights and interfaith organizations was published calling on the Obama administration to rescind the regulatory framework for NSEERS. Ten days later, more than 50 Democratic members of the House of Representatives sent a letter to President Obama demanding the same.

In December, the Obama administration announced that it would dismantle the dormant program on the grounds “that NSEERS is not only obsolete, but that its use would divert limited personnel and resources from more effective measures.” The United States now has an entry-exit system for all foreign visitors, rendering the rationale for introducing an additional registry targeting a subset of visitors from Muslim-majority countries less plausible.

While NSEERS was widely deemed counterproductive in preventing terrorism, it was never found unconstitutional. Attempts to constitutionally challenge the program failed with federal district courts across the country. In 2008, when a challenge reached the 2nd Circuit, that federal appellate court also ruled in favor of the program. Under current constitutional jurisprudence, the federal government’s authority over immigration allows for national origin-based discrimination at our borders.

However, Trump’s proposals might fare differently. Some of the “extreme vetting questions” listed in a draft proposal by a Trump advisor photographed in November were clearly related to religious belief, with questions about Sharia, jihad and gender equality. The vetting topics listed in the draft Executive Order that was leaked yesterday include a version of these questions without direct reference to Islam. For instance, in the place of jihad the order references “violent religious edicts.”

Whereas the Bush administration disavowed religious profiling in its post-9/11 policies, Trump has repeatedly stated his intention to specifically target the Muslim community during the campaign and since the election. The same federal courts that found the NSEERS program constitutional might reach a different conclusion if new programs were shown to be based on religious animus.

Aslı Ü. Bâli is professor of law at the UCLA School of Law and director of the UCLA Center for Near Eastern Studies.