Video games deserve the same constitutional protections as books and movies, the Supreme Court ruled Monday in striking down as unconstitutional California’s attempt to ban the sale of violent games to minors.

In a 7 to 2 vote, the court upheld a lower court’s decision that California’s law imposing a $1,000 fine on those who sell or rent violent video games to minors violated free-speech rights. But there was more disagreement on the court than that tally would indicate.

The same is true in the rest of the United States, as social scientists and parents debate whether video games represent a new and frightening phenomenon with dangerous psychological effects, or simply trigger unproven fears that accompany any new technology.

It was the court’s first examination of a trend that has reached into two-thirds of American homes and created a multibillion-dollar industry. Lawmakers across the country, catering to parents worried about a technology their children understand better than they do, have passed laws banning the sale of violent video games to minors, and other states want the option. Courts have struck down each of those attempts.

Writing for the majority, Justice Antonin Scalia said that “like the protected books, plays and movies that preceded them, video games communicate ideas — and even social messages” that are guarded by the First Amendment.

He continued: “No doubt a state possesses legitimate power to protect children from harm, but that does not include a free-floating power to restrict the ideas to which children may be exposed.”

He was joined by Justices Anthony M. Kennedy, Ruth Bader Ginsburg, Sonia Sotomayor and Elena Kagan.

Justices Clarence Thomas and Stephen G. Breyer dissented for separate reasons.

Justice Samuel A. Alito Jr. and Chief Justice John G. Roberts Jr. agreed with the outcome of the case but did not join Scalia’s opinion.

Alito and Roberts concluded that “California’s law is not framed with the precision that the Constitution demands.” Although the majority did not invite a rewrite of the law, Alito said he would not “squelch legislative efforts” to come up with a law that is less vague.

Alito and Roberts said the court was too sanguine about the effects of video games, which, in Alito’s words, “may be very different from anything we have seen before.”

He described games in which players can reenact the killings at Columbine High School and Virginia Tech; in which the goal is raping Native American women or killing ethnic and religious minorities; in which new technology may allow a player to “actually feel the splatting blood from the blown-off head” of a victim.

Scalia was unmoved. “Justice Alito recounts all these disgusting video games in order to disgust us — but disgust is not a valid basis for restricting expression,” Scalia wrote.

He said that violence has never been found to be outside the First Amendment’s protection. And he noted that children through the years have been fed a hefty portion of it, from fairy tales (“Cinderella’s evil stepsisters have their eyes pecked out by doves”) to high school reading lists (“Lord of the Flies recounts how a schoolboy called Piggy is savagely murdered by other children”).

Michael D. Gallagher, president and chief executive of the Entertainment Software Association, which represents the U.S. computer and video game industry, said the decision means that “parents, not government bureaucrats, have the right to decide what is appropriate for their children.”

California’s lawmakers said that is exactly what their law would have done: require any video game deemed violent to be bought by someone 18 or older.

The law targeted games that allow a player the option of “killing, maiming, dismembering or sexually assaulting” a human image. The definition of a violent video game was one that as a whole lacks “serious literary, artistic, political or scientific value” and appeals to minors’ “deviant or morbid interests.”

Scalia noted that the court has said that some forms of expression lack First Amendment protection — obscenity, incitement, “fighting words.” But last year, in an 8 to 1 vote in United States v. Stevens, the court struck down a federal law making it a crime to sell videos of animal cruelty. Alito dissented.

The last time the court declared that the First Amendment does not protect a whole field of speech was in 1968, when in Ginsberg v. New York it allowed the government to keep from minors sexual material that had not been judged obscene for adults.

The California law was meant to extend that ruling to violent video games, and Breyer agreed. He said the disturbing images in video games are at least as damaging to children as the pictures of nudity the court has said can be prohibited.

“What sense does it make to forbid selling to a 13-year-old boy a magazine with an image of a nude woman, while protecting a sale to that 13-year-old of an interactive video game in which he actively, but virtually, binds and gags the woman, then tortures and kills her?” Breyer wrote.

Thomas based his support for the law on an originalist view of the Constitution. “ ‘The freedom of speech,’ as originally understood, does not include a right to speak to minors without going through the minors’ parents or guardians,” he wrote.

Fellow originalist Scalia said that was simply wrong. “He cites no case, state or federal, supporting this view, and to our knowledge there is none,” Scalia said.

Scalia also said that the industry’s voluntary rating of video games “meets a substantial need of parents.” The association discourages the sale of “mature” videos to those younger than 17, he said, and the Federal Trade Commission said in a 2009 report that the video game industry does a better job than the music and movie industries in keeping certain products from children.

He also said that of all of the studies that have been conducted on the effects of violent video games on children — Breyer listed 15 pages of their titles — none proves that the games “cause minors to act aggressively.”

The case is Brown v. Entertainment Merchants Association.