In dueling decisions Thursday about free speech, the Supreme Court upheld Texas' refusal to issue a license plate bearing the Confederate battle flag and struck down an Arizona town's restrictions on temporary signs put up by a small church.

The court unanimously said the town of Gilbert, Arizona, ran afoul of the First Amendment by setting tougher rules for signs placed in the right of way along public streets to direct people to Sunday church services than for signs for political candidates and real estate agents.

But in Texas, where the state venerates the Confederacy and allows some 450 different messages on license plates as part of a lucrative specialty-plate program, the court said officials can limit the content of license plates because the plates are state property, and not the equivalent of bumper stickers.

The 5-4 decision upheld a ruling that denied the Sons of Confederate Veterans a plate with its Confederate battle flag logo out of concern that it remains a racially charged symbol of repression to some — even as it also is a potent image of heritage to others.

The differing outcomes were, at first glance, hard to reconcile, several scholars said. "If you put these cases side by side, the results look very strange," said University of Chicago law professor David Strauss.

One possible difference is that the court imposes strict rules about when the government can forbid something, like the placement and size of signs, and offers governments more leeway when they refuse to support or subsidize speech, Strauss said.

"Support the Confederacy all you want, but you just can't use our license plates for that speech," he said. "When the government is withholding support, rather than threatening punishment, the rules are very murky."

The Texas division of the Sons of Confederate Veterans sued over the state's decision not to authorize its proposed license plate with its logo bearing the battle flag, similar to plates issued by eight other states that were part of the Confederacy and by the state of Maryland.

A panel of federal appeals court judges ruled that the board's decision violated the group's First Amendment rights. "We understand that some members of the public find the Confederate flag offensive. But that fact does not justify the board's decision," wrote Judge Edward Prado of the 5th U.S. Circuit Court of Appeals in New Orleans.

Justice Stephen Breyer, though, said that when a message appears on license plates it becomes the government's statement, and not that of private individuals. He said the First Amendment applies when governments try to regulate the speech of others, but not when governments are doing the talking.

The Supreme Court has previously ruled that states can't force drivers to display license plates that contain messages with which the drivers disagree, Breyer said. "And just as Texas cannot require SCV (the Sons of Confederate Veterans) to convey 'the state's ideological message'," Breyer said, quoting from that earlier ruling, "SCV cannot force Texas to include a Confederate battle flag on its specialty license plates." Breyer wrote for the unusual lineup of his three liberal colleagues and conservative Justice Clarence Thomas.

Justice Samuel Alito said in dissent that the decision "threatens private speech that the government finds displeasing." Chief Justice John Roberts and Justices Anthony Kennedy and Antonin Scalia also dissented.

In the Arizona case, the only disagreement among the justices was over why the law violated the rights of the small, cash-strapped Good News Community Church and its pastor, Clyde Reed.

The church complained that the law limited the church to smaller signs than those allowed for political candidates, real estate agents and others. The church's signs also could be in place only for shorter periods of time.

Lower federal courts had upheld the town's sign ordinance, saying the distinction it drew between different kinds of temporary signs was not based on what a sign said.

Thomas rejected that argument in his majority opinion for six of the nine justices. Thomas said political signs are "given more favorable treatment than messages announcing an assembly of like-minded individuals. That is a paradigmatic example of content-based discrimination."

Under the rigorous review the court gives to laws that treat speakers differently because of content, the law must fall, Thomas said.

Justice Elena Kagan said she fears that all sign ordinances now will have to face the same strict review and many "are now in jeopardy" because of Thursday's decision.

There was a narrower way to decide the case in the church's favor, Kagan said. The town's defense of its sign ordinance was marked by the "absence of any sensible basis" for distinguishing among signs and did not pass "even the laugh test," she said, with agreement from Justice Ruth Bader Ginsburg and Breyer.

Thomas said the decision would not prevent cities and towns from regulating signs to take account of safety and aesthetic concerns.

The ruling could boost challenges to other local ordinances limiting speech, including restrictions on panhandling, said Kevin Martin, a former Scalia law clerk who is handling some of those cases.

The sign ordinance struck down Thursday allowed directional signs, like the ones put up by the church inviting people to Sunday worship, to be no larger than 6 square feet. They had to be placed in public areas no more than 12 hours before an event and removed within an hour of its end.

Signs for political candidates, by contrast, can be up to 32 square feet and stay in place for several months.