BIRMINGHAM, Alabama (Reuters) - A U.S. appeals court Friday temporarily blocked Alabama from enforcing part of its tough new law cracking down on illegal immigrants but allowed some disputed portions to remain in effect.

The U.S. Court of Appeals for the 11th Circuit, based in Atlanta, granted the Obama administration and a coalition of civil rights groups a temporary stay for the provision that permits Alabama to require public schools to determine the legal residency of children upon enrollment.

But the ruling allows the state to continue authorizing police to detain people suspected of being in the country illegally if they cannot produce proper documentation when stopped for any reason.

The law has led some illegal immigrants in Alabama to pull their children out of school and even flee the state.

(Writing by Colleen Jenkins; Editing by Jerry Norton)