(FOX NEWS) The Supreme Court handed a big win to a former Washington high school football coach who lost his job over reciting a prayer on the 50-yard line after games.

At issue was whether a public school employee praying alone but in view of students was engaging in unprotected “government speech,” and if it is not government speech, does it still pose a problem under the First Amendment’s Establishment Clause

The Supreme Court ruled Monday in a 6-3 decision that the answer to both questions is no. “Here, a government entity sought to punish an individual for engaging in a brief, quiet, personal religious observance doubly protected by the Free Exercise and Free Speech Clauses of the First Amendment. And the only meaningful justification the government offered for its reprisal rested on a mistaken view that it had a duty to ferret out and suppress,” Justice Neil Gorsuch wrote in the Court’s opinion. “Religious observances even as it allows comparable secular speech. The Constitution neither mandates nor tolerates that kind of discrimination.”

Joe Kennedy was a junior varsity head coach and varsity assistant coach with the Bremerton School District in Washington from 2008 to 2015. He began the practice of reciting a post-game prayer by himself, but eventually students started joining him. According to court documents, this evolved into motivational speeches that included religious themes. After an opposing coach brought it to the principal’s attention, the school district told Kennedy to stop. He did, temporarily, then notified the school that he would resume the practice.

The situation garnered media attention, and when Kennedy announced that he would go back to praying on the field, it raised security concerns. When he did pray after the game, a number of people stormed the field in support.

The school district then offered to let Kennedy pray in other locations before and after games, or for him to pray on the 50-yard line after everyone else had left the premises, but he refused, insisting that he would continue his regular practice. After continuing the prayers at two more games, the school district placed Kennedy on leave.