BOSTON (AP) — The Pledge of Allegiance does not discriminate against atheists and can be recited at the start of the day in public schools, Massachusetts' highest court ruled Friday.

The Supreme Judicial Court said the words "under God" in the pledge reflect patriotic practice, not a religious one. They acknowledged that the wording has a "religious tinge" but said it is fundamentally patriotic and voluntary.

The court was ruling in a 2010 lawsuit filed by an atheist family from Acton who claimed that the daily recitation of the pledge in classrooms violated their three children's equal protection rights under the state constitution, which protects against discrimination. The family was not identified in the lawsuit.

Stephen Mills, the superintendent of the Acton-Boxborough Regional School District, said officials were pleased with the ruling.

"It is a pledge of national loyalty, not a prayer," he said, adding that the district paid about $60,000 in legal fees to fight the lawsuit.

"We will continue to respect every child's right to recite the pledge or not," Mills added.

David Niose, an attorney representing the family and the American Humanist Association, said in a statement Friday that "no child should go to public school every day, from kindergarten to grade 12, and be faced with an exercise that portrays his or her religious group as less patriotic."

The children involved in the lawsuit didn't face bullying and harassment, the court noted. Niose said that is significant, because a child who is ridiculed for not reciting the pledge could come forward in the future and force the courts to re-examine the issue.

A lower court judge ruled in 2012 that the inclusion of "under God" did not violate the school's anti-discrimination policy or state law. The family appealed.

The phrase "under God," which was added to the pledge in 1954, has been the subject of numerous lawsuits over the years. The U.S. Supreme Court has ruled that students cannot be compelled to recite the pledge, nor punished for refusing to recite it.