A federal appeals court on Friday blocked part of an Alabama law that required undocumented aliens to carry identification and empowered schools to gather information on immigration status.

The 11th U.S. Circuit Court of Appeals’ panel of three judges let stand another part of the law requiring police to detain immigrants suspected of being in the U.S. illegally.

As a result of the law, thousands of immigrants in Alabama have fled the state, according to reports. Latino enrollment in Alabama schools has reportedly dropped.

An American Civil Liberties Union attorney, who was one of the parties in the case opposing the law, said his organization was “particularly relieved,” saying the part of the law that was blocked had “led to unjustifiable arrests and detentions.”

The group aims to overturn the entire law.

A final decision is not expected for months, as the court will now hear an appeal of a lower-court ruling last month that upheld most of the law.