The Supreme Court decided against a California atheist’s claim that “under God” in the Pledge of Allegiance was legal, but sidestepped the broader issue of its constitutionality.

The Supreme Court ruled today that a California atheist did not have the legal standing to challenge the constitutionality of the words “under God” in the Pledge of Allegiance, dismissing on procedural grounds a lower court’s ruling in his favor but sidestepping the broader question of whether the pledge itself is constitutional.

The ruling effectively preserved the phrase “one nation under God” that is recited daily as part of the pledge by millions of schoolchildren across the country.

But by basing the decision on a procedural issue, the Supreme Court left open the prospect that a challenge to the constitutionality of the Pledge of Allegiance could come up again.

In a ruling that, coincidentally, was issued on Flag Day — and on the 50th anniversary of the addition by Congress of the words “under God” to the pledge — the justices voted 8-0 to overturn a ruling two years ago by the 9th U.S. Circuit Court of Appeals that the pledge was unconstitutional in public schools because it violated the separation of church and state. Justice Antonin Scalia did not participate in the case.

Five of the justices voted against the 9th Circuit’s ruling on the grounds that Michael Newdow, the California atheist who filed suit to ban the pledge from his daughter’s school, did not have the legal standing to speak for the girl because he did not have sufficient custody to qualify as her legal representative. The girl, who is in elementary school, was not named in the case.

Chief Justice William H. Rehnquist and two other justices — Sandra Day O’Connor and Clarence Thomas — agreed that the lower court’s ruling should be overturned, but not on the standing issue. Instead, they argued that the words “under God” in the pledge do not violate the Constitution.

“When hard questions of domestic relations are sure to affect the outcome, the prudent course is for the federal court to stay its hand rather than reach out to resolve a weighty question of federal constitutional law,” Justice John Paul Stevens wrote for the majority.

Newdow, a emergency-room doctor and law graduate who acted as his own attorney, is involved a custody battle with his daughter’s mother, Sandra Banning, a born-again Christian who has custody of the girl on school days. Banning, who has never been married to Newdow, has told the court that she has no objection to her daughter’s reciting the pledge.