NEWARK - Federal authorities in New Jersey set up a fake university that they say snared 21 people operating a large-scale student visa scam that involved more than 1,000 foreign nationals.

The U.S. attorney's office announced Tuesday that it created the University of Northern New Jersey in 2013 staffed by undercover agents, but without classes or instructors. It was based in a building in Cranford, about 15 miles from New York City.

The agents allegedly were given cash by recruiters and brokers 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.

The Associated Press wire services contributed to this report.