WASHINGTON, April 16 — In a case that addresses some of the most fundamental issues of technology and morality, the United States Supreme Court ruled today that Congress went too far in 1996, when it passed a law that treats "virtual" or computer-generated child pornography as the real thing.

The court held, 6 to 3, that the Child Pornography Prevention Act is overly broad and unconstitutional, despite its supporters' arguments that computer-generated smut depicting children could stimulate pedophiles to molest youngsters.

"The sexual abuse of a child is a most serious crime and an act repugnant to the moral instincts of a decent people," Justice Anthony M. Kennedy wrote in the majority decision. Nevertheless, he said, if the 1996 law were allowed to stand, the Constitution's First Amendment right to free speech would be "turned upside down."

"Congress may pass valid laws to protect children from abuse, and it has," Justice Kennedy wrote. "The prospect of crime, however, by itself does not justify laws suppressing protected speech."