MILWAUKEE - SEPTEMBER 20: An American Flag flies outside the US Bank Center on September 20, 2014 in Milwaukee, Wisconsin. (Photo By Raymond Boyd/Getty Images)

Officials at a Southern California high school have apologized after an atheist student was pressured to stand for the Pledge of Allegiance against his will.

A ninth grade student at Oak Park High School in California's Ventura County said he had attempted to stay seated at his desk while his class recited the pledge. However, the student said his teacher reprimanded him for sitting and "intimidated" him to the point where he felt compelled to stand during the exercise.

After the student contacted the American Humanist Association about the incident, the nonprofit group penned a letter to the school district on the student's behalf, noting that the teacher had violated the student's First Amendment rights by compelling him to say the pledge.

"Under the guise of patriotism, this school authority figure has demonstrated shocking indifference for the very Constitution he claims to deem so sacred," reads the Sept. 29 letter. "We demand that this situation be remedied immediately."

According to the Los Angeles Times, school officials apologized to the student, citing the teacher's ignorance of the student's First Amendment rights.

"It was a mistake," Oak Park Unified School District superintendent Anthony Knight said.

Knight issued a districtwide memo to teachers to remind them that students have a right to refuse to stand for or recite the pledge.

"Compelling a student to stand or participate in any way is considered a violation of the student’s First Amendment rights to free speech and expression," Knight wrote, according to the Times. "There may be a commonly held misunderstanding that students can decide to refrain from saying the Pledge but can be required to stand out of respect. This is not correct."