Donald Trump rode into office on a promise to step up scrutiny of immigrants who might come to the US to commit terrorist acts — especially Muslims. Now, thanks to transition team member and Kansas Secretary of State Kris Kobach, we’re getting a sense of what that might look like.

Kobach told Reuters that the Trump administration-in-waiting is considering reinstating a database of immigrants from Muslim-majority countries — something the federal government did from 2002 to 2011.

The Kobach proposal isn’t the same thing as the database of Muslim US citizens that Trump briefly floated (and then walked back) last year. It’s subtler — and that makes it a lot more plausible.

The difference between a “Muslim database” and a “database of particular people in the US from particular countries, which happen to be majority Muslim” might seem like a meaningless distinction, something to give a gloss of neutrality to something clearly discriminatory. But that gloss of neutrality matters a lot. It’s the reason the federal government was able to keep a database for a decade. And it’s probably the reason you might not have known that database existed at all.

The Bush-era registry that just happened to target majority-Muslim countries

Kobach knows exactly what he’s talking about. As a staffer in George W. Bush’s Justice Department after 9/11, he led the effort to put together the National Security Entry-Exit Registration System, or NSEERS.

Under NSEERS, certain “foreign citizens and nationals” in the US had to come into immigration offices for fingerprinting, photos, and interviews — and then had to check in again at designated intervals.

But this “special registration” system was selective. It only applied to people on non-immigrant visas (including tourism and work visas). It only applied to men over the age of 16. And it only applied to people from a list of countries the Bush administration considered “havens for terrorists.”

There were 25 countries on the “special registration” list. Twenty-four were majority-Muslim countries. The 25th was North Korea.

Over the next decade, more than 80,000 men were put into NSEERS “special registration” database — Muslims and non-Muslims from suspected countries alike. But to Muslim American and civil rights groups, the fact that the Bush administration was responding to 9/11 by ordering thousands of Muslim men to show up to register with the government was de facto discriminatory.

Courts have given the US a lot of leeway in singling out people from particular countries

The executive branch has pretty broad authority over immigration policy, and it has very broad authority over foreign policy. When the federal government enacts an immigration policy that has foreign policy consequences, the courts are especially unlikely to intervene.

So when the government designates people from particular countries for special treatment, according to Kevin Johnson of University of California Davis, "those are the kinds of things the courts are likely to say have foreign policy implications and should be in the hands of the federal government and the executive branch."

In other words, it might not be constitutional for the government to single out Muslim immigrants for particular treatment. But it’s another thing for the government to single them out on a country-by-country basis — “to say ‘I'm going to ban migrants, or Muslims, even, from Yemen,’" Johnson says.

So while NSEERS got challenged in court, the challenges didn’t get very far. One 2006 ruling in the First Circuit Court of Appeals, according to an essay by Nitin Goyal (then a law student), "specifically [cited] the national security justifications for the regulation and the special deference given to the executive and legislative branches over issues of immigration."

It’s theoretically possible that 15 years after 9/11, the courts would be less deferential. But the fact that NSEERS didn’t only require Muslims to register — and that, in fact, non-Muslims also got deported for failing to comply with the program’s terms — made it easy for the government to claim its only concern was with the countries from which immigrants originated, not their religion or race.

NSEERS was an easy way to scoop up Muslim immigrants for minor violations

The Department of Homeland Security says that NSEERS allowed it to catch and deport suspected terrorists. But according to the American Civil Liberties Union, no one registered with NSEERS was ever actually convicted of a terrorism-related crime before deportation.

What NSEERS did do, however, was provide an easy way to catch Muslim men (and non-Muslim men from Muslim countries) in the US who violated the terms of their visas, or of the “special registration” program itself.

By July 2003, less than a year after NSEERS went into effect, the government had registered 83,000 men in the database — and had put 13,000 of them in court proceedings for deportation. In the first two months of NSEERS, 1,000 registrants were detained, and all but 15 of them were detained for civil violations.

Most of these men had violated the terms of their visas at some point while living in the US — though thousands of them had applied for green cards before they registered with NSEERS, and just hadn’t had their applications approved yet.

In theory, the purpose of NSEERS was to catch terrorists, not people who’d violated civil immigration laws. But visa overstays were what the government found. And visa overstays were what it punished.

“A non-immigrant visitor who overstays a visa, is present without inspection, [or] commits a crime or fraud is just as removable under those grounds as terrorism grounds,” a government fact sheet on the program proclaimed.

Immigrants who didn’t comply with NSEERS (by, for example, not showing up to follow-up appointments) could be deported. But people registering with NSEERS, and giving their information to the government, made it easier to deport someone who then overstayed his visa than it would have been to deport him if he’d refused to register at all.

The Bush administration occasionally conducted raids (like one of an Indonesian community in New Jersey in 2006, detailed in a 2012 report by Penn State Law and advocacy groups) that rounded up and deported dozens of men who’d overstayed visas, but not their wives and children — leading the rest of the community to assume that the information the men had given to NSEERS allowed them to be detained and deported.

The Obama administration suspended “special registration” — but didn’t fully dismantle it

Theoretically, the NSEERS program was supposed to be expanded to visa holders from all countries. (That’s another reason the US government argued it wasn’t discriminatory.) But it wasn’t. Instead, in 2011, the Obama administration removed all 25 countries from the “special registration” list — suspending the program.

The suspension was treated as a civil rights victory. But the government didn’t end special registration itself; it just didn’t apply to any particular countries anymore.

Furthermore, the stated reason for killing NSEERS wasn’t about discrimination. It was about database redundancy. The government pointed out that in the years since 2002, it had implemented other programs that collected information about people entering and leaving the US, so it could stop using NSEERS without losing any data.

This is true, but it doesn’t mean that NSEERS — or a new program along similar lines — wouldn’t do anything. The US government still doesn’t have a reliable way to track visa overstays (something that immigration hawks have complained about for years). By requiring check-ins for “special registration” subjects, the government had an easy way to apprehend someone who had accidentally overstayed a visa (or had slipped between the cracks in the past before getting a new one).

The worst-case scenario for NSEERS — a mass expulsion of everyone in the database from the US — never materialized. It would have been very hard to do. Instead, NSEERS was used as an easy way to identify and scoop up people who hadn’t followed every step of the process perfectly, who just happened to come from countries the US considered dangerous.

The “Muslim registry” won’t be called a “Muslim registry”

The Trump administration might not take Kobach’s suggestion to reinstitute a database of Muslim immigrants — Kobach simply told Reuters that the transition team was considering a proposal along those lines. And if they do, it might not look identical to NSEERS.

But the NSEERS precedent matters not just as a guide to what a “Muslim registry” might look like but as a reminder: It won’t be called a “Muslim registry” at all.

On the campaign trail, Trump didn’t have a problem endorsing racism and discrimination. But when he said something that appeared to cross a constitutional line, he was more likely to walk it back. He took back comments about making soldiers engage in war crimes, for example. And he slowly tweaked the idea of the “Muslim ban” so that it was no longer “about religion,” and instead focused on “terror-prone regions.”

Back in November 2015, Trump was asked if he’d require Muslim citizens of the US to register, and said, “Absolutely ... they have to be.” He never brought it up again, and his campaign “clarified” that he didn’t mean it. Now that Trump is president-elect, the Muslim registry isn’t being reanimated — it’s being reshaped into something that not only could pass constitutional muster but also isn’t even unprecedented.

A lot of people didn’t know about NSEERS when it was in effect. That’s not a reason not to care now. It’s a reminder that when policies are actually implemented, they’re rarely as crude and legally dubious as a politician like President-elect Trump makes them sound — and that makes it harder for them to be challenged, either in court or in the public eye.

Watch: Saluted in uniform, harassed as a civilian