NEW YORK (AP) — A federal appeals court says it was constitutional for the United States to require visitors from two dozen Arab and Muslim countries and North Korea to register with immigration authorities.

The 2nd U.S. Circuit Court of Appeals in Manhattan issued its ruling Wednesday in cases brought by several men who claimed their constitutional rights were violated.

The program was put in place after the Sept. 11, 2001 terrorist attacks. It required males from 24 Arab and predominantly Muslim countries and North Korea to register.

The requirement has since been phased out, but the database of information still exists.

The men involved in the court cases had been ordered deported because they did not have proper immigration status.