Washington (CNN) -- Public schools in Western states can continue teacher-led reciting of the Pledge of Allegiance, after a federal court ruled against a group of atheist parents.

The 9th Circuit U.S. Court of Appeals, based in San Francisco, California, ruled 2-1 Thursday that the pledge does not represent a government endorsement of religion, prohibited by the Constitution.

"The Pledge of Allegiance serves to unite our vast nation through the proud recitation of some of the ideals upon which our republic was founded and for which we continue to strive: one Nation under God," wrote the majority. "Millions of people daily recite these words when pledging allegiance to the United States of America."

The ruling applies only to the 11 states and territories in the West covered by the 9th Circuit, but it reinforces other rulings from other courts upholding the pledge. The same appeals court also ruled separately Thursday, upholding the use of the words "In God We Trust" on U.S. money.

The lawsuit was brought by several parents in the Sacramento, California, area who objected to the school policy.

Among them is Michael Newdow, a prominent attorney and atheist, who had brought his long-standing dispute to the U.S. Supreme Court in 2004. The justices had dismissed that earlier appeal on purely technical grounds, over questions he lacking standing as a custodial parent to bring the lawsuit on behalf of his school-age daughter. Newdow then recruited other parents into the current case.

Newdow said he would appeal Thursday's decision but acknowledged his dim prospects going forward. "This was the appeal and this is the end of the road in terms of what you're guaranteed," he said.

Newdow said he'll ask for a rehearing and, if that fails, will appeal to the Supreme Court. "But they don't have to take it," he said, referring to the nation's high court, "and the odds are pretty good that they won't."

A woman identified only as Jan Roe was a key plaintiff, arguing she did not believe in God. She claimed the daily recitation interfered with her right to direct her child's upbringing and that it indoctrinated her child with the belief that God exists.

Children are not required to stand and repeat the pledge, but some parents said the social pressures to conform were an improper infringement of their rights. The plaintiffs now have the option of asking the Supreme Court to hear the case.

The appeals court framed the issue as a dispute over whether was a traditional patriotic exercise or a blatant religious message. The same court in 2002 agreed with Newdow and other atheist parents.

In dissent to Thursday's ruling, Judge Stephen Reinhardt said the pledge was an overtly religious message.

"Carrying out such an indoctrination in a public school classroom unconstitutionally forces many young children either to profess a religious belief antithetical to their personal views or to declare themselves through their silence or nonparticipation to be protesting nonbelievers, thereby subjecting themselves to hostility and ridicule," he wrote.

The Supreme Court previously has ruled the mere mention of God or religion by the government in a public setting does not necessarily mean a violation of the "Establishment Clause" of the Constitution, which ensures the separation of church and state.

Examples that have met high court scrutiny include Ten Commandments or Chanukah menorah displays in a public park; opening a legislative session with a prayer; granting tax breaks for religious organizations; and reimbursing transportation costs for parents whose end their children to parochial schools.

The pledge was written in 1892 by Baptist minister and educator Francis Bellamy, who made no reference to religion in his version. It was originally worded: "I pledge allegiance to my flag and the republic for which it stands, one nation, indivisible, with liberty and justice for all." It quickly became a part of public school programs.

In 1954, Congress added the words "under God," at the urging of the Knights of Columbus and other groups. Another modification was to change "my flag" to "the flag of the United States of America."

"This decision is a victory for common sense," Supreme Knight Carl A. Anderson of the Knights of Columbus said in a news release. "Today, the court got it absolutely right: Recitation of the pledge is a patriotic exercise, not a religious prayer. ... Every reasonable person knows that, and today's decision is a breath of fresh air from a court system that has too often seemed to be almost allergic to public references to God."

The case is Newdow v. Rio Linda Union School District (05-17257).