A Catholic school in southern California allegedly fired a veteran teacher because he married his same-sex partner.

The San Bernardino County Sun reported Wednesday that 45-year-old Ken Bencomo was fired from his job after teaching at St. Lucy’s Priory High School in Glendora for 17 years.

Bencomo's attorney told the San Bernardino County Sun the school believed the teacher had "violated church teachings" by marrying his partner after same-sex marriages resumed in California.

Bencomo and his partner Christopher Persky were one of the first same-sex couples to get married at the San Bernardino County Assessor-Recorder’s Office after a Supreme Court ruling killed the state's ban on same-sex marriages. The marriage was featured in the Inland Valley Daily Bulletin on July 1.

Brittany Littleton, a former student of Bencomo, created a petition at Change.org calling on the school to give Bencomo his job back.

"As a proud alumni of St. Lucy's, I am disgusted and heartbroken by this act of prejudice. I believe that Mr. Bencomo deserves to keep his job, and that discrimination against teachers based on their sexual orientation must end," she wrote.

Littleton told Raw Story that students were shocked to see Bencomo was no longer on their schedules.

"I think many of us would have considered him a friend then and still do now," she explained. "News of him being fired spread very quickly when students received their schedules and his name was not on them. I was completely shocked and sickened. I didn't want to believe it was true, but when I verified that it was I knew we had to act."