The Supreme Court agreed yesterday to extend a ban on enforcement of a federal law designed to shield minors from Internet pornography, ruling for the third time in seven years that a congressional effort to curb online obscenity threatens free speech.

By a vote of 5 to 4, the court held that the government still has not proved that criminal penalties imposed on certain sexually oriented Web sites by the Child Online Protection Act (COPA) protect children without unduly limiting options for adults. The court sent the case back to a federal district court in Pennsylvania for trial, leaving an injunction against COPA's enforcement in place pending those proceedings.

"Content-based prohibitions, enforced by severe criminal penalties, have the constant potential to be a repressive force in the lives and thoughts of a free people," Justice Anthony M. Kennedy wrote for the court majority. "To guard against that threat the Constitution demands that content-based restrictions on speech be presumed invalid, and that the Government bear the burden of showing their constitutionality."

"This is true," Kennedy added, "even when Congress twice has attempted to find a constitutional means to restrict, and punish, the speech in question."

The decision means that unless the federal government can convince a federal judge that COPA's provisions are the only plausible means to prevent children from finding inappropriate sexual material on the Internet, the statute, which was passed by Congress and signed into law by President Bill Clinton in 1998, will be dead.

In a statement, Justice Department spokesman Mark Corallo said that the department "will continue to work to defend children from the dangerous predators who lurk in the dark shadows of the World Wide Web."

Yet it is unclear how the government can win the case after yesterday's ruling. Kennedy's opinion strongly suggested that the government could have accomplished its purposes by encouraging parents to use software that filters out pornography. Kennedy noted that COPA's criminal penalties would not reach Web sites that originate in foreign countries, while a filter would.

"It will be very difficult for the government to prove a criminal statute is less restrictive than voluntary filtering and blocking technology, given the global nature of the Internet," said Jerry Berman, president of the Center for Democracy and Technology, which submitted a friend-of-the-court brief opposing COPA.

The origins of yesterday's case lie in a 1997 ruling by the court that struck down a broader law, the 1996 Communications Decency Act (CDA), as a violation of the First Amendment.

COPA prescribed fines of $50,000 and up to six months in prison for commercial sites that knowingly placed "harmful" sexual material within reach of people younger than 17. But it attempted to fix the constitutional defects the court saw in the CDA by exempting Web sites that make a good-faith effort to use passwords, credit card numbers or other measures to block minors' access to sexual material.

COPA was found unconstitutional in 2000 by the Philadelphia-based U.S. Court of Appeals for the 3rd Circuit.

In 2002, a sharply divided Supreme Court told the 3rd Circuit to redo its decision; last year, the 3rd Circuit struck down the law again, based on a different legal argument, and the Bush administration appealed the case once again to the Supreme Court.

The administration argued that the law had been carefully redrawn to meet the court's constitutional concerns.

But the law's opponents, represented by the American Civil Liberties Union, argued that the history of the CDA and COPA showed the futility of legislation to restrict access to sexual material on the vast and ever-changing Internet. However well-intentioned, COPA's provisions aimed at children inevitably limit Web publishers' freedom to communicate with adults, and that is unconstitutional, opponents said.

They cited the law's potential chilling effect on the publication of material including women's health information and independent counsel Kenneth W. Starr's report on Clinton's affair with White House intern Monica S. Lewinsky.

As free-speech cases often do, this one scrambled the court's usual ideological lines. Kennedy and another conservative, Justice Clarence Thomas, were joined in the majority yesterday by liberals John Paul Stevens, David H. Souter and Ruth Bader Ginsburg.

In dissent were three conservatives -- Chief Justice William H. Rehnquist and Justices Sandra Day O'Connor and Antonin Scalia -- and a liberal, Stephen G. Breyer.

In his opinion, Breyer voiced measured exasperation with the majority's opinion, asking, "What else was Congress supposed to do?"

The court's logic would unrealistically shift the burden of controlling children's access to pornography from the government to parents, Breyer argued, noting that filtering software is expensive and that many parents are not at home to supervise their children's computer use.

COPA, he wrote, "imposes a burden on protected speech that is no more than modest."

The case is Ashcroft v. ACLU, No. 03-218.

Attorney General John D. Ashcroft was the petitioner in the case against the American Civil Liberties Union regarding a federal law designed to shield minors from Internet pornography.