Federal authorities in New Jersey have arrested 21 people in what they say is a visa scam that involved more than 1,000 foreign nationals.

The U.S. attorney's office announced Tuesday that it created a fake university in 2013 staffed by undercover agents and which had instructors, classes or curriculum.

They allegedly were given cash for helping the purported students in the visa process.

The defendants are charged with conspiracy to commit visa fraud and conspiracy to harbor aliens for profit. The second charge carries a maximum prison term of 10 years.

Most of the foreign nationals who benefited from the alleged scheme hailed from China and India.

U.S. Attorney Paul Fishman says the students have been identified and will be dealt with by immigration authorities, but won't be prosecuted.