WASHINGTON — The Supreme Court on Monday refused to let California regulate the sale or rental of violent video games to children, saying governments do not have the power to "restrict the ideas to which children may be exposed" despite complaints about graphic violence.

On a 7-2 vote, the high court upheld a federal appeals court decision to throw out the state's ban on the sale or rental of violent video games to minors. The 9th U.S. Circuit Court of Appeals in Sacramento had ruled that the law violated minors' rights under the First Amendment, and the high court agreed.

"No doubt a state possesses legitimate power to protect children from harm," said Justice Antonin Scalia, who wrote the majority opinion. "But that does not include a free-floating power to restrict the ideas to which children may be exposed."

The California law would have prohibited the sale or rental of violent games to anyone under 18. Retailers who violated the act would have been fined up to $1,000 for each infraction.

More than 46 million American households have at least one video-game system, with the industry bringing in at least $18 billion in 2010.

Unlike depictions of "sexual conduct," Scalia said there is no tradition in the United States of restricting children's access to depictions of violence, pointing out the violence in the original depiction of many popular children's fairy tales like Hansel and Gretel, Cinderella and Snow White.

Hansel and Gretel kill their captor by baking her in an oven, Cinderella's evil stepsisters have their eyes pecked out by doves and the evil queen in Snow White is forced to wear red hot slippers and dance until she is dead, Scalia said.

"Certainly the books we give children to read — or read to them when they are younger — contain no shortage of gore," Scalia added.

But Justice Clarence Thomas, who dissented from the decision along with Justice Stephen Breyer, said the majority read something into the First Amendment that isn't there.

"The practices and beliefs of the founding generation establish that "the freedom of speech," as originally understood, does not include a right to speak to minors (or a right of minors to access speech) without going through the minors' parents or guardians," Thomas wrote.