THE GOAL of attrition through law enforcement for illegal immigrants — or, to use the term Mitt Romney favors, “self-deportation” — has suffered a series of setbacks. The latest came Monday when a federal appeals court blocked major parts of Alabama’s draconian immigration law, including one that required public schools to collect information on pupils’ immigration status. It is increasingly clear that Republican state lawmakers and governors have gone too far in their campaign to harass and bully the nation’s 11 million illegal immigrants in the hope that they will simply disappear.

Alabama has the distinction of having enacted the nation’s only immigration law that was more aggressive — and more blatantly designed to banish illegal immigrants — than Arizona’s. The idea was to persecute a class of people who had come to the state to fill jobs most Americans don’t want, thus making life so miserable for them that they would leave. State legislators were unmoved by farmers and others who pointed out that the departure of these workers would leave no one to harvest crops and do other jobs critical to the state’s economy.

The law’s most obnoxious provision turned public schools into immigration agents by forcing them to ask enrolling students about their and their parents’ immigration status. The U.S. Court of Appeals for the 11th Circuit blocked that measure, saying that it violated the equal protection clause of the 14th Amendment by singling out undocumented students, whose right to a public education was affirmed by the Supreme Court 30 years ago.

One gets the impression that if Alabama lawmakers could have devised a way to criminalize immigrants’ breathing the state’s air, they would have done so. Instead, they threw up an array of other obstacles to immigrants’ ability to live in Alabama. “Essentially, the ability to maintain even a minimal existence is no longer an option for unlawfully present aliens in Alabama,” the court wrote.

The court blocked many of these provisions. One would have criminalized the mere act of seeking or performing work by illegal immigrants. Another would have rendered all contracts with illegal immigrants, including leases and employment contracts, unenforceable in court. Still another would have created a new state crime for failing to carry an alien registration document, which is a federal violation.

While stopping those parts of the law from taking effect, the court, taking its cue from the Supreme Court’s decision on Arizona’s immigration law, let stand so-called show-me-your-papers provisions in laws passed by Alabama and Georgia. Those allow police to demand immigration documents from suspects who have been detained at traffic stops or for other violations.

A separate lawsuit brought by civil rights and Hispanic advocacy groups is attempting to show that this measure will subject minorities, including legal immigrants and native-born Americans, to racial profiling and unjustified detentions and arrests. It remains to be seen how the courts will treat that litigation. If it succeeds, the Republican efforts at the state level to make life untenable for illegal immigrants will have been for naught.