A sharply divided Supreme Court on Monday upheld the constitutionality of displaying the Ten Commandments on government land, but drew the line on displays inside courthouses, saying they violated the doctrine of separation of church and state.

Sending dual signals in ruling on this issue for the first time in a quarter-century, the high court said that displays of the Ten Commandments — like their own courtroom frieze — are not inherently unconstitutional. But each exhibit demands scrutiny to determine whether it goes too far in amounting to a governmental promotion of religion, the Court said in a case involving Kentucky courthouse exhibits.