SAN LUIS OBISPO, Calif. – A California high school teacher recently resigned amid a public backlash over a letter to the editor of his school’s student news site that puts homosexuality into biblical perspective.

San Luis Obispo High School special education teacher Michael Stack submitted a letter to the editor of Expressions, the student news site, last month in response to a recent issue focused on LGBT issues, and is now fielding death threats from those who disagree with his views, Life Site News reports.

MORE NEWS: Know These Before Moving From Cyprus To The UK

Stack cited Romans 1:16-32 that states homosexuals “suffered within themselves the penalty they deserved” for turning away from God.

“Since they thought it foolish to acknowledge God,” Stack wrote, “He abandoned them to their foolish thinking and let them do things that should never be done.”

“They know God’s justice requires that those who do these things deserve to die, yet they do them anyway,” the letter continued. “Worse yet, they encourage others to do them too.”

Local social justice warriors instantly attacked the first year teacher.

“Stack’s letter — in the name of religion — promotes discrimination, hatred and bigotry. Stack is not a ‘teacher.’ A teacher educates by helping students acquire knowledge and competences,” Cambria resident Howard Vallens wrote into the San Luis Obispo Tribune.

“Promoting discrimination is the antithesis of a ‘teacher.’ As a pupil, stuck needs to learn or re-learn to accept others as they are, to appreciate sexual diversity, and understand that his letter violates basic federal constitutional guarantees of equal protection.”

MORE NEWS: How to prepare for face-to-face classes

Mayor Heidi Harmon described Stack’s letter as “unacceptable” on Facebook. And dozens of LGBT rights activists lined up at the school in May to protest, the Tribune reports.

Stack was later forced to go into hiding after school officials received a death threat against him.

“We are concerned for his safety, San Luis Coastal Unified School District Superintendent Eric Prater said after Stack did not show up to school last month.

District officials consulted with a Fresno-based attorney and determined that Stack’s letter is protected by the First Amendment. Both school officials and student editors of Expressions defended his right to speak his mind.

“A bedrock principle underlying the First Amendment is that the government may not prohibit the expression of an idea simply because society finds the idea offensive or disagreeable,” San Luis Coastal Unified School District Superintendent Eric Prater and Principal Leslie O’Connor said in a joint statement.

“As a district, we understand that students do not shed their First Amendment rights at school, and we respect the rights of our students to speak on controversial topics.”

Expressions editor-in-chief Aric Sweeney told Teen “Vogue “good journalism includes giving voice to both sides regardless of whether or not I agree with him.”

As the controversy came to a boil, Stack submitted a resignation letter via email and sent a copy to Fox News, according to Life Site.

“The community apparently wants me out,” he wrote, “so I hereby grant them their desires.”

And Stack did not seem to hold any ill will toward his critics.

“I exercised my First Amendment rights and submitted my opinion in a public forum,” he wrote. “Now people are exercising their First Amendment rights by responding to that letter. This is how America is designed to function.”