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.