In a blow to Illinois' sweeping eavesdropping law, a federal appeals court on Tuesday blocked its enforcement in cases where someone is recording a police officer at work.

It was a victory for activists who had feared that using smartphones or video cameras to record police responding to demonstrations during this month's NATO summit in Chicago could land protesters and bloggers behind bars for years. It's also the most serious legal challenge to the measure _ one of the strictest in the nation _ and adds momentum to efforts by some state lawmakers to overhaul the legislation, whose constitutionality has been questioned.

The law, enacted in 1961, makes it a felony for someone to produce an audio recording of a conversation unless all parties agree. It sets a maximum punishment of 15 years in prison if a law enforcement officer is recorded.

In a separate decision late last month, the city of Chicago's chief legal officer said police did not intend to enforce the law during the May 20-21 summit, but Cook County State's Attorney Anita Alvarez had not given similar assurances. Tuesday's temporary injunction put summit protesters in the clear.

"The Illinois eavesdropping statute restricts far more speech than necessary to protect legitimate privacy interests," the U.S. Court of Appeals for the Seventh Circuit said in its opinion. "As applied to the facts alleged here, it likely violates the First Amendment's free speech and free-press guarantees."

The ruling stemmed from a 2010 lawsuit brought by the American Civil Liberties Union seeking to block Alvarez from prosecuting ACLU staff for recording police officers performing their duties in public places, one of the group's long-standing monitoring missions.

"To make the rights of free expression ... effective, individuals and organizations must be able to freely gather and record information about the conduct of government and their agents _ especially the police," Harvey Grossman of the ACLU of Illinois said Tuesday in reaction to the ruling.

He noted that with new technology, it is easier than ever to record and disseminate images and audio recordings.

"Empowering individuals and organizations in this fashion will ensure additional transparency and oversight of police across the state," Grossman said.

Alvarez's office said it was preparing a statement, but had no immediate response to the ruling. The court described her position as "extreme."

"She contends that openly recording what police officers say while performing their duties in traditional public fora _ streets, sidewalks, plazas, and parks _ is wholly unprotected by the First Amendment. This is an extraordinary argument," the ruling read.

Protest organizers praised the court action.

"We have had this just ridiculously long fight with the city around the right to protest here," said Joe Isobaker, of the Coalition Against NATO/G-8 War & Poverty Agenda. "And this just serves to confirm the correctness of our stance, which is that we have the right to speak out against war and greed and the other evils of our society."

In the state capital, a Senate bill that would rewrite the law to formally include an exception for people recording police officers at work in public places is awaiting a vote in the House. An earlier bill failed in a House vote, but the measure has been revised to reflect some of the concerns of law enforcement officials.

One of its sponsors, Rep. Elaine Nekritz, said the right to record police was vital to guard against abuses.

"I think citizens have First Amendment rights to protect themselves against an overreaching government and this is one way they can do that," she said.