The US Supreme Court has dismissed an attempt by an atheist father to stop his daughter swearing allegiance to "one nation, under God" every morning.
The US Supreme Court is the guardian of the constitution
The ruling temporarily safeguards the Pledge of Allegiance, recited by millions of US schoolchildren each day.
Michael Newdow, from California, hoped the court would judge that the religious pledge was unconstitutional.
But the court ruled that an ongoing custody battle with his former partner meant he could not act for the girl.
Each morning millions of children in public schools across the United States recite the pledge under direction from their teachers.
During arguments in the Supreme Court Michael Newdow, a doctor with a law degree, told the court that the government "is supposed to stay out of religion".
'One nation, under God'
But eight Supreme Court judges dismissed his claim, ruling that Mr Newdow's domestic circumstances were clouding the issue.
"When hard questions of domestic relations are sure to affect the outcome, the prudent course if for the federal court to stay its hand rather than reach out to resolve a weighty issue of constitutional law," Justice John Paul Stevens wrote for the court.
Chief Justice William H Rehnquist added that the pledge as it stands does not violate the US constitution.
Under the current wording, teachers and students say they "pledge allegiance to the flag of the United States of America and to the republic for which it stands, one nation under God, indivisible, with liberty and justice for all".
Protesters against any change held a candle-lit vigil outside the court
The words "under God" were added to the original 1892 pledge in 1954, as part of an effort to distinguish the US way of life from the Soviet Union's atheistic communism.
Mr Newdow filed the lawsuit because he was unhappy that his nine-year-old daughter had to recite the pledge at her school at Elk Grove, northern California.
He sued her school and won, setting up the landmark appeal before a court that has repeatedly barred school-sponsored prayer from classrooms, playing fields and school ceremonies.
The case sparked huge debate within the US, with demonstrators gathering outside the Supreme Court to protest for or against the pledge.