A federal judge in Alexandria has upheld the constitutionality of Virginia laws that require daily recitation of the Pledge of Allegiance and the posting of the motto "In God We Trust" in state schools, weighing in on the fierce national debate over the role of religion in schools.

The ruling by U.S. District Judge James C. Cacheris is a sign that a controversial appeals court ruling in California that banned teacher-led recitation of the pledge in schools has had little impact nationally and that the issue is probably headed to the U.S. Supreme Court.

"It's pretty certain that one way or another, the Supreme Court is going to hear this," said Eugene Volokh, a specialist in church-state law at UCLA. "It's an issue of very substantial public concern."

In his Feb. 21 decision, Cacheris dismissed a lawsuit filed against Loudoun County schools that challenged the constitutionality of the two state laws, writing that "the statute mandating recitation of the pledge is secular because it aims to foster democracy, which is both necessary to the survival of the concept and entirely independent of religion."

Loudoun County resident Edward Myers had sued the School Board and Superintendent Edgar B. Hatrick, arguing that the pledge is an idolatrous prayer that his two elementary school-age children should not have to hear. He also argued that the posting of the "In God We Trust" motto is unconstitutional because the posters were provided to the schools by a private religious organization. Myers grew up on a Pennsylvania farm as a Mennonite, a religious tradition that forbids followers to swear from allegiance to any entity other than God.

Virginia Attorney General Jerry W. Kilgore (R), whose office defended the laws, praised the decision. "This is a great ruling for the schoolchildren of Virginia," he said yesterday in a statement.

Myers said in an interview last week that he had not decided whether to appeal the decision to the U.S. Court of Appeals for the 4th Circuit. Myers, who is representing himself, said he believes that his arguments against the pledge deserve to be heard by the appellate court.

Legal experts predicted that if he did appeal, the 4th Circuit, known as the most conservative appellate court in the nation, would uphold Cacheris's ruling. That would put the 4th Circuit in direct conflict with the U.S. Court of Appeals for the 9th Circuit, based in San Francisco.

A three-judge panel of the California court ruled in June that the pledge is unconstitutional because it describes the United States as "one Nation, under God," violating the First Amendment prohibition on the establishment of a state religion. The decision immediately triggered denunciations from both major political parties, though some legal scholars defended the court's reasoning.

Last week, the full 24-member court let the decision stand but backtracked slightly. The original ruling not only barred schools from sponsoring the pledge but also struck down the 1954 federal law that added the words "under God" -- making the pledge itself unconstitutional. That ruling was omitted from an "amended" version of the court's opinion.

The 9th Circuit has put the decision, which was supposed to take effect Monday, on hold, pending a possible appeal to the Supreme Court. The high court often resolves important issues when federal circuits clash over how to interpret the law. The 7th Circuit, which covers three midwestern states, issued a decision in 1992 upholding the use of the phrase "under God" in the pledge.

"There is already a clear disagreement on this," said Volokh, adding that the Supreme Court may take up the issue even before any potential appeal of the Myers lawsuit is heard.

A poster reading "In God We Trust" hangs in a Virginia Beach school.