BELFAST, Maine — A national humanist organization has written a letter to Belfast-area school officials in support of a high school student who says he was wrongly punished for sitting out the Pledge of Allegiance, as is his constitutional right.

The incident that prompted the American Humanist Association to write the letter to RSU 20 and Belfast Area High School officials happened on Friday, just weeks after senior class leaders at South Portland High School faced backlash for reminding their classmates over the morning announcements that standing for the pledge is optional.

The Belfast junior — who does not wish to be identified — remained seated at his desk during his class’ daily recitation of the pledge.

The student then was confronted by a teacher, who ordered him to report to the office “for what she perceived as misbehavior,” Monica Miller, an attorney with the association’s Appignani Humanist Legal Center, said in the letter on Sunday.

According to Miller, the student wished to opt out of the pledge exercise for personal and religious reasons, including his objection to the “under God” language in the pledge.

“The student attempted to explain to school officials that he had the right to not participate in the pledge, but administrators informed him that he was required to stand for the pledge and that failure to do so in the future would be met with serious consequences,” Miller said.

The letter demands that school district officials inform students and staff that students may exercise their right to sit out the Pledge of Allegiance and that any written policy stating otherwise be rescinded.

It also demands that teachers be instructed not to dissuade students from sitting during the pledge, not to characterize such behavior as wrongful and that no disciplinary action be directed at students who choose not to participate.

RSU 20 Superintendent Brian Carpenter said Monday that he was aware of the matter and that it has been addressed.

“I’m not well enlightened on it. I just know there was an incident,” he said. “The kid did not stand. I assume, which I probably shouldn’t, that this is in response to what happened in South Portland,” Carpenter said.

“The bottom line is that federal law says they don’t have to stand or recite it, and state of Maine law says they don’t have to recite it,” he said.

Carpenter said Monday that the student was within his rights to opt out and that teachers have been notified to that end. No disciplinary action was taken, he added.

Roy Speckhardt, the humanist group’s executive director, said that students may have many reasons for choosing not to recite the Pledge of Allegiance.

“For instance, the assertion that this nation is ‘under God’ discriminates against humanist and atheist students by characterizing them as unpatriotic, second-class citizens,” he said.

The humanist group is actively campaigning to get the public to boycott the pledge because it believes that the addition of “under God” to it in 1954 implies that those who don’t believe in God are not patriotic, according to its website.