The First Amendment to the Constitution has two connected clauses on religion, one prohibiting an “establishment of religion” and the other protecting the “free exercise thereof.”

The case of Kennedy v. Bremerton School District involved a high school football coach, Joe Kennedy, who routinely kneeled midfield after games to offer a private prayer of thanks, saying he was engaging in the free exercise of his religion.

His school district in Washington state fired Kennedy for doing so, claiming that allowing such a religious display would amount to an establishment of religion.

In Kennedy v. Bremerton School District, the Supreme Court tried to untie this knot by ruling Monday that the school district violated the coach’s constitutional rights.

Since being hired in 2008, Kennedy had knelt on the field after each game to briefly express gratitude for what his players had accomplished and for the opportunity to be part of their lives. When players asked to join him, Kennedy agreed but never pressured or encouraged them to do so.

Kennedy also continued a practice, begun before his hiring, of pregame or postgame prayer in the locker room for students and coaching staff.

In September 2015, the school district warned Kennedy about making “religious references” in the presence of students at midfield and during the locker room prayer tradition.

The school district claimed a “direct tension” between the First Amendment’s two religion clauses required an employee’s right to exercise his religion to “yield so far as necessary to avoid school endorsement of religious activities.”

The district also claimed that if anyone saw Kennedy kneeling, by himself and in silence, they might assume that the district endorsed whatever he was doing. That risk was enough to prohibit him from doing so, the district said, even when, as happened one time, “everyone had left the stadium.”

The school district said it would allow Kennedy such a solitary silent prayer only if he was “not observable to students or the public.”

Attempting to comply, Kennedy ended the tradition of locker room prayers and avoided any religious references when players joined him at midfield. He drew the line, however, at his solitary, silent, brief prayer after a game.

After his dismissal, Kennedy sued, claiming that the school district had violated his First Amendment rights to exercise his religion and to speak freely.

The lower courts sided with the school district. The U.S. Court of Appeals for the 9th Circuit said that anything Kennedy said on the field, at a time when he could have been talking to students, amounted to “speech as a government employee.” Allowing any religious speech, even silently, would constitute an establishment of religion, the appeals court said.

In the opinion released Monday, the Supreme Court voted 6-3 to reverse the 9th Circuit. Justice Neil Gorsuch’s majority opinion was joined by Chief Justice John Roberts and Justices Clarence Thomas, Samuel Alito, Amy Coney Barrett, and (except for one section) Brett Kavanaugh.

The school district’s policy was hardly neutral or “generally applicable,” the high court said, because it targeted only religious expression, a conclusion that the school district conceded.

Under the Supreme Court’s previous decisions, therefore, the school district had to show that its policy was “narrowly tailored” to serve a “compelling” government interest, the toughest standard the high court applies. The school district failed to meet this standard, violating Kennedy’s right to freely exercise religion.

As to free speech, the court asked whether Kennedy offered his silent prayers “in his capacity as a private citizen, or did they amount to government speech attributable to the District?”

Unlike some of the court’s previous cases, Kennedy’s prayer was not “commissioned or created” by the government, or anything that the coach would be expected to say “in the course of carrying out his job.”

When Kennedy knelt for his silent prayer, others were free to engage in all manner of private speech. Kennedy was simply not acting within the scope of his employment and, therefore, his prayer was private rather than government speech.

The Supreme Court rejected the idea that the school district could avoid violating the establishment clause only by violating Kennedy’s right under the free exercise clause.

The First Amendment’s free speech and religion clauses, Gorsuch wrote, are not “warring” with each other. The lower courts treated them that way only by relying on the Supreme Court’s 1971 decision in Lemon v. Kurtzman, which invited judges to explore the purpose and effect of government actions, as well as make subjective judgments about “excessive entanglement” between government and religion.

The Lemon decision was so difficult to understand and apply that many courts simply opted to “purge from the public sphere” anything that anyone might think “partakes of the religious.” The lower courts in Kennedy’s case had relied on Lemon when, in fact, the Supreme Court “long ago abandoned” it, although it never has been formally overturned.

Although relying on Lemon resulted in pitting the First Amendment’s religion clauses against each other, the Supreme Court looked instead to “historical practices and understandings” to bring the clauses into harmony.

“An analysis focused on original meaning and history,” Gorsuch wrote, leads to the conclusion that a brief silent prayer, even if others might observe it or even be offended by it, does not amount to the government’s endorsing religion.

It’s important to remember the facts of this case.

A coach knelt by himself, after a game ended and everyone else was tending to their own business, to offer a silent prayer lasting less than a minute. The school district claimed that the First Amendment required it to ignore his rights and fire him because someone might have seen him kneel and might have thought the school district approved of this.

That view, Gorsuch wrote, is “a sure sign that our Establishment Clause jurisprudence has gone off the rails.”

In his 1973 dissenting opinion in Roe v. Wade, then-Justice William Rehnquist wrote that “the Court’s opinion will accomplish the seemingly impossible feat of leaving this area of the law more confused than it found it.” That charge had long applied to the court’s decisions involving the religion clauses.

Once the court started ignoring what those clauses originally were intended to mean, it started inventing its own versions, with new tests or standards popping up and then fading away, and similar cases being decided with opposite results.

The Supreme Court’s decision in Kennedy v. Bremerton School District is a helpful step in sorting out the mess.

Have an opinion about this article? To sound off, please email and we’ll consider publishing your edited remarks in our regular “We Hear You” feature. Remember to include the URL or headline of the article plus your name and town and/or state.