(Photo: Logan Bannatyne/LoLoStock/iStockphoto.com.)

Massachusetts’ highest court ruled Friday that leading students in the U.S. pledge of allegiance—including the words “under God”—does not violate the state constitution’s equal-protection clause or a state law barring religion-based discrimination in the public schools.

The Supreme Judicial Court rejected a challenge brought by Jane and John Doe, described in court documents as atheists and humanists whose children attend public schools in Acton, Mass., or in the Acton-Boxborough regional school system.

The ruling affirmed a trial judge’s grant of summary judgment to the defendants. A local couple, their children and the Knights of Columbus had intervened in support of retaining the pledge.

“Courts that have considered the history of the pledge and the presence of those words have consistently concluded that the pledge, notwithstanding its reference to God, is a fundamentally patriotic exercise, not a religious one,” Chief Justice Roderick Ireland wrote, citing precedents from the U.S. Supreme Court and the federal circuits.

Associate Justices Margot Botsford, Robert Cordy, Fernande Duffly, Ralph Gants, Barbara Lenk and Francis Spina joined him.

In rejecting the plaintiffs’ equal-protection claim, Ireland noted that students are free to recite all, some or none of the pledge.

“The fact that a school or other public entity operates a voluntary program or offers an activity that offends the religious beliefs of one or more individuals, and leaves them feeling ‘stigmatized’ or ‘excluded’ as a result, does not mean that the program or activity necessarily violates equal-protection principles,” Ireland wrote.

Geoffrey Bok, a partner at Boston’s Stoneman, Chandler & Miller who argued for the school district, referred questions to his client. School district superintendent Stephen Mills said he was “delighted with the courts’ decision to uphold the long-standing tradition” of reciting the pledge. He said he also was pleased the justices recognized that the students at the center of the dispute were never harassed or discriminated against.

Plaintiffs lawyer David Niose of Lunenburg, Mass.-based Law Offices of David Niose lamented the outcome, saying, “Atheists still have a long way to go to achieve equality.”

The court put too much weight on the fact that the children were not actually bullied or harassed because of their atheism, he said. “We felt that if a daily school exercise—for the purpose of instilling patriotism—portrays one religious group favorably and another unfavorably, that should be enough to establish a violation based on religious discrimination under the state constitution,” Niose said.

Sheri Qualters can be contacted at squalters@alm.com.