Updated

Part of Alabama's immigration law that ordered public schools to check the citizenship status of new students was ruled unconstitutional Monday by a federal appeals court that also said police in that state and Georgia can demand papers from criminal suspects they have detained.

The 11th Circuit Court of Appeals ruled that the Alabama schools provision wrongly singles out children who are in the country illegally. Alabama was the only state that passed such a requirement and the 11th Circuit previously had blocked that part of the law from being enforced.

Judges said fear of the law "significantly deters undocumented children from enrolling in and attending school ...."

Both private groups and the Obama administration filed lawsuits to block the law considered the toughest in the country.

The court, however, upheld parts of immigration laws in Alabama and Georgia allowing law enforcement to check documents for people they stop.

And the panel left in place an injunction that blocks a section of the Georgia law that allows for the prosecution of people who knowingly harbor or transport an illegal immigrant during the commission of a crime.

In Alabama, the judges sided with opponents of the law on other key points, including challenges to sections that made it illegal to harbor illegal immigrants; made it a crime for illegal immigrants to seek work; and made it a state crime for people in the country illegally not to have registration documents.

The decisions follow a recent U.S. Supreme Court ruling upholding parts of a similar law in Arizona. The Atlanta-based court referenced that decision in its opinion to lift the injunction on the suspect verification section.

Georgia and Alabama are among several states that have enacted anti-illegal immigration laws in recent years. Proponents have argued they are necessary in part because of alleged federal inaction. Opponents have argued that many of the laws are punitive to immigrants and that policy must be steered by the federal government.

Omar Jadwat, an American Civil Liberties Union attorney involved in challenging similar laws in Alabama and Georgia, said the judges stuck down the schools provision "in pretty robust terms" and effectively opposed the sponsors' stated idea of forcing illegal immigrants to "self-deport" by making their lives too difficult.

"The original idea behind the law, that these provisions would all work together to allow the states to aggressively identify and prosecute undocumented residents, has been shot down," said Jadwat.

Alabama Republican Gov. Robert Bentley disagreed, saying the court upheld the "essence" of the law.

"The core of Alabama's immigration law remains that if you live or work in the state, you should do so legally," said Bentley, who signed the measure. "It is time now to move past court battles and focus on enforcement of Alabama's law."

School officials said many Hispanic parents quit sending their children to class immediately after Bentley signed the law, and some families left the state in fear. Local education systems have said many children returned to class, and some immigrant families moved back to Alabama after courts blocked many provisions in the law.

In a statement, Georgia Attorney General Sam Olens said he was generally pleased with the ruling for his state but disagreed with the court on the section dealing with transporting illegal immigrant that is still being blocked.

Jadwat said the organization will continue to challenge so-called "show-me-your-papers" provisions of the state immigration laws.

"The court today rejected many parts of Alabama and Georgia's anti-immigrant laws, including attempts to criminalize everyday interactions with undocumented immigrants and Alabama's callous attempt to deprive some children of their constitutional right to education," he said in a statement. "The court explicitly left the door open to further challenges against the `show me your papers' provision, which we will continue to fight."