A US appeals court has upheld and overturned parts of an Alabama immigration law that is seen as the toughest of its kind in the US.
The judges temporarily blocked a measure requiring schools to check the immigration status of students.
They also overturned powers to charge immigrants who do not carry documents proving their legal status.
But the three-judge panel let stand a provision that allows police to detain suspected illegal immigrants.
Friday's ruling by the 11th US Circuit Court of Appeals in Atlanta, Georgia, follows a legal challenge by the federal justice department this month.
Immigration is a flashpoint in Alabama state, which has seen a rapid rise in the size of its Hispanic population.
Supporters and opponents of Alabama's law say it is stricter than similar acts in Arizona, Utah, Indiana and Georgia.
Judges in those states have blocked some or all parts of those measures.