About 10 years ago, Phanideep Karnati immigrated from India to the U.S. on an H1-B visa in search of the American dream.

He became an IT engineer, was earning a masters degree at the University of Louisville in Kentucky and is today married with two sons, ages 2 and 9.

But on Monday, the 35-year-old Kentucky man appeared in shackles and a prisoner's jumpsuit in a federal courtroom in Detroit, arraigned on charges of conspiracy to commit visa fraud and harboring aliens for profit as a recruiter for a fake university in Farmington Hills created by U.S. law enforcement. A not-guilty plea was entered for him by Magistrate Judge R. Steven Whalen, who ordered him released on a $10,000 unsecured bond.

Karnati was one of five defendants who appeared Monday afternoon in U.S. District Court in Detroit, and one of eight foreign nationals charged with visa fraud. Whalen said the defendants face up to five years in prison and $250,000 fine if convicted.

Prosecutors allege the students recruited hundreds of other students to enroll at the University of Farmington as part of a "pay to stay" scheme where foreign students could remain in the U.S. while working. The university was created by Immigration and Customs Enforcement to lure in more than 600 students, of which 130 were arrested last week on civil immigration charges.

In a separate criminal case, eight immigrants were charged with being recruiters, taking kickbacks and cash in exchange for referring students to the University of Farmington.

Speaking after the arraignment, Karnati's attorney, John Brusstar, criticized the government's allegations and sting operation.

"It is unfair for the government to set up something like this to entrap people," Brusstar said.

Karnati's wife, two sons and other supporters were in the courtroom. She held her two-year-old son as the attorney described how the family feels.

"They love this country, but are saddened by what happened," Brusstar said.

More:India urges U.S. to release students detained in fake Michigan university sting

More:Fake University of Farmington in Michigan leads to 130 arrests

More:Farmington Hills fake university set up by ICE to nab foreign students

Six of the eight defendants were arrested in Michigan. Five appeared in court on Monday and one, Prem Rampeesa, 26, of Charlotte, North Carolina, is requesting an interpreter and is scheduled to appear in court later this week.

In addition to Karnati, the others who appeared in court Monday were: Santosh Sama, 28, of Fremont, California; Avinash Thakkallapally, 28, of Harrisburg, Pennsylvania; and Aswanth Nune, 26, of Atlanta.

They all face similar charges, and not guilty pleas were entered for all of them by Magistrate Whalen.

Except for Karnati, who is on a work visa, the defendants will not be released from jail because they have immigration holds since they are undocumented since the U.S. revealed the university they were enrolled in was fake. Their defense attorneys consented to their detention since they would face detention by immigration authorities.

Nune's attorney, Michael Rataj, said after the arraignment that Nune had moved to the U.S. in 2017 on a student visa. He had worked in technology fields for Samsung and a subsidiary or Sprint, Rataj said.

The students enrolled at the fake university with the intent to obtain jobs under a student visa program called CPT (Curricular Practical Training) that allows students to work in the U.S., prosecutors said.

Defense attorneys say such programs are legitimate and that the U.S. tricked the students in joining the University of Farmington.

The university had said it was legitimate and approved by the Department of Homeland Security. The department had listed the university as a legitimate place for foreign students, said immigration attorneys in contact with the students.

Like Karnati, many of the students who have been detained are from India and are in STEM fields. Out of the 130 detained by ICE, 129 are from India and one is Palestinian. All of the 8 alleged recruiters criminally charged are also from India.

Karnati and others at the university have roots in the Telugu-speaking region of India. The American Telugu Association says it is working to help those arrested.

India's government has urged the U.S. to release the 129 students arrested on immigration charges, noting that their cases are different from the eight criminally charged.

Update: On Tuesday, India's Ministry of External Affairs said its embassy and consular officials have been in contact with 117 of the 129 Indian students detained by ICE on immigration charges at 36 detention sites across the U.S.

"India continues to attach high priority to the well-being of the detained students and will remain constantly engaged with the U.S. authorities and other stakeholders, to address the issue," the Indian Ministry said in a statement.

Contact Niraj Warikoo:nwarikoo@freepress.com or 313-223-4792. Follow him on Twitter @nwarikoo