Updated

A divided Supreme Court ruled Monday that Congress can force the nation's public libraries to equip computers with anti-pornography filters (search).

The blocking technology, intended to keep smut from children, does not violate the First Amendment (search) even though it shuts off some legitimate, informational Web sites, the court held.

The court said because libraries can disable the filters for any patrons who ask, the system is not too burdensome. The 6-3 ruling reinstates a law that told libraries to install filters or surrender federal money. Four justices said the law was constitutional, and two others said it was allowable as long as patrons were not denied Internet access.

It was victory for Congress, which has struggled to find ways to shield children from pornographic Internet sites. Congress has passed three laws since 1996 -- the first was struck down by the Supreme Court and the second was blocked by the court from taking effect.

The first two laws dealt with regulations on Web site operators. The latest approach, in the 2000 law, mandated that public libraries put blocking technology on computers as a condition for receiving federal money. Libraries have received about $1 billion since 1999 in technologies subsidies, including tax money and telecommunications industry fees.

The government had argued that libraries don't have X-rated movies and magazines on their shelves and shouldn't have to offer access to pornography on their computers.

Librarians and civil liberties groups countered that filters are censorship and that they block valuable information. Filter operators must review millions of Web sites to decide which ones to block.

Chief Justice William H. Rehnquist said the law, the Children's Internet Protection Act (search), does not turn librarians into censors.

A three-judge federal panel in Pennsylvania ruled last year that the law was unconstitutional because it caused libraries to violate the First Amendment. The filtering programs block too much nonpornographic material, the panel found.

The Supreme Court disagreed. Rehnquist's opinion was joined by Justices Sandra Day O'Connor, Antonin Scalia and Clarence Thomas.

Justices Anthony M. Kennedy and Stephen Breyer, in separate opinions, said the government's interest in protecting young library users from inappropriate material outweighs the burden on library users having to ask staff to disconnect filters.

Justice John Paul Stevens, David H. Souter and Ruth Bader Ginsburg said the law went too far in restricting material in public libraries, which are used by more than 14 million people annually.

"A statutory blunderbuss that mandates this vast amount of overblocking abridges the freedom of speech protected by the First Amendment," Stevens wrote.

Even without the law in place, some libraries use filtering software on their computers, with varying degrees of success in screening out objectionable material. Other libraries have varying policies that encourage parents to monitor their children's Internet use.

"We challenged this law because filters are very blunt instruments that block more than illegal speech, including a great deal of speech that is not even sexual in nature at all," said Paul M. Smith, the Washington attorney who represented the American Library Association. "We're disappointed that the court said that this one-size fits-all answer is the way to handle this problem of sexual content on the Internet in the library setting."

The case is United States v. American Library Association, 02-361.