The University of Farmington website described a college that would prepare students to succeed in an “ever-globalizing economy”. Students would show up at campus wearing backpacks and asking questions about classes. The US government listed Farmington as eligible to enroll foreign students. The school president, whose LinkedIn page is still online, sent emails to students describing his institution as “a nationally accredited institution authorized to enroll international students”.

But it was all a sham to snare immigrants.

Court documents unsealed last month unveiled a stunning scheme by the US Department of Homeland Security (DHS) to create a fake university – with no classes or professors, just a staff of undercover agents who went on to build a case that has seen 161 foreign nationals arrested.

The University of Farmington website has been shuttered by Ice. Photograph: screengrab

“These are students who are trying to make their lives better, these are not criminals, these are not people who are here leeching off the system,” said Amer Zahr, an adjunct professor of law at the University of Detroit-Mercy and a spokesman for Najlaa Krim Musarsa, one of the students arrested.

Musarsa, a 29-year-old woman from Palestine, was one of those arrested without trial for civil immigration violations because she enrolled in the university, located just outside of Detroit in Farmington Hills, Michigan. Eight other people were charged with criminal violations and are accused of helping enroll the students in exchange for cash, kickbacks and tuition credits from February 2017 to January 2019.

Attorneys and civil rights advocates emphasize there is a stark line between the eight indicted on criminal charges and the students arrested on civil charges.

“Everyone was taken completely by surprise,” Zahr said. “There was no warning of this action. There was no notice given to her [Musarsa] that she was out of status, that this university was fake.”

Most of the students were Indian and the country’s government issued a rare “démarche” to the US embassy in New Delhi stating the government needed immediate access to the detainees. As of 5 February, India consular officials had visited 36 different detention centers across the US and created a 24/7 hotline for impacted students.

Since the indictment was unsealed on 30 January, US Immigration and Customs Enforcement (Ice) has maintained each of the more than 600 people enrolled at the University of Farmington knew they would not attend real classes or earn credits. “Their intent was to fraudulently maintain their student visa status and to obtain work authorization,” the indictment said.

Faiza Patel, the codirector of the liberty and national security program at New York University’s Brennan Center for Justice, said it was not 100% clear that every student knew what they were getting into.

“Normally, we would like our law enforcement agencies to be investigating crimes that are already occurring as opposed to spending time and resources in creating elaborate sting operations,” said Patel.

Patel noted Ice has been under fire in recent years for its aggressive immigration enforcement tactics, which target criminals and people who have civil immigration violations in equal measure.

“It’s an open question as to whether this is the best use of Ice’s resources,” Patel said. “I think these days we have a lot of open questions about whether the way Ice is responding is a logical response to the problems this country faces.”

At the University of Farmington, federal agents posed as school officials in emails and registered the school with the state of Michigan, according to emails obtained by the Detroit Free Press. Workers at the building listed as University of Farmington’s location told local news channel WXYZ that students would come in asking what time the school opened and closed and complained they had trouble getting in touch with school representatives.

The undercover operation was led by the nation’s second largest investigative agency, Homeland Security Investigations (HSI), which is one of the three branches of Ice. A 2008 Ice handbook leaked last year showed that while undercover agents are advised not to induce people to commit crimes, exceptions can be made and are internally regulated.

This is not the first sham university created by Ice. In 2016, the agency announced the University of Northern New Jersey was not a legitimate school and its only employees were undercover agents. Then, too, the government insisted the more than 1,000 students were aware they were participating in a fraud. About 20 brokers were also arrested for recruiting students.

Angelo Guisado, the staff attorney at the Center for Constitutional Rights, said DHS carried out the operation aware that it could send hundreds of people to immigration courts, which do not have the same constitutional protections as other courts.

“Ice knowing this or DHS knowing this tries to ensnare as many people as possible and get them wound up in an immigration system where they know that the cards are going to be stacked against the immigrant,” Guisado said.

He cautioned that creating a sham university was in line with other tactics used by Ice, such as its habit also revealed last month of creating fake court dates for immigration hearings.

Guisado said: “This is not the first fake university that DHS created and I don’t think it will be the last.”