An Indiana music theory teacher pushed out of his job for refusing to call transgender students their preferred names and pronouns took a hit from a federal judge Friday who upheld a lower court's ruling that the school district did not violate his rights.

Former Brownsburg High School teacher John Kluge sued the school district alleging religious discrimination after he cited his personal religious convictions for refusing to abide by the name and pronoun policy, opting to address transgender students by their last names instead.

The school district, after enacting the policy in 2017, initially agreed to let Kluge use last names to address the students instead, according to The Associated Press.

KANSAS SCHOOL DISTRICT: GENDER IDENTITY CAN BE KEPT FROM PARENTS, AVOIDING PREFERRED PRONOUNS CAN CAUSE DEATH

Pronouns

A person wears a gender-neutral pronoun jacket at a Rainbow Runway for Equality to kick off Pride Month at Central World Mall on June 01, 2022, in Bangkok, Thailand. ((Photo by Lauren DeCicca/Getty Images))

Some students alleged the move created an uncomfortable classroom experience and singled out students who identified as transgender and reported their concerns.

Kluge said he later resigned inn 2018 after the school reevaluated the last name policy and told him he would be fired if he did not comply with the preferred name and pronoun rule on the books.

He sued with the help of conservative legal group Alliance Defending Freedom a year later, alleging workplace discrimination while requesting his job back and unspecified money damages, AP reported.

FLORIDA BILL WOULD RESTRICT GENDER PRONOUNS IN SCHOOLS, DEFINE BIOLOGICAL SEX AS AN ‘IMMUTABLE’ TRAIT

gender fluid sign

Woman holding sign with gender pronouns and symbols near white brick wall (iStock)

The Chicago-based 7th U.S. Circuit Court of Appeals ruled on Friday that Kluge's religious convictions on the issue disrupted classroom operations, upholding an Indiana federal judge's previous ruling that the refusal "created an undue hardship on the district."

"Brownsburg has demonstrated as a matter of law that the requested accommodation worked an undue burden on the school's educational mission by harming transgender students and negatively impacting the learning environment for transgender students, for other students in Kluge's classes and in the school generally, and for faculty," the court's opinion read.

WISCONSIN MIDDLE SCHOOLERS ACCUSED OF SEXUAL HARASSMENT FOR USING WRONG GENDER PRONOUNS

Kluge's attorney Rory Gray maintains that the ousting was unlawful, writing in a statement, "Congress passed Title VII to prevent employers from forcing workers to abandon their beliefs to keep their jobs. In this case, Mr. Kluge went out of his way to accommodate his students and treat them all with respect. The school district even permitted this accommodation before unlawfully punishing Mr. Kluge for his religious beliefs."

The development follows other instances of school officials facing penalties for refusing to abide by certain transgender name and pronoun policies, including former teacher Peter Vlaming, who alleged the Virginia West Point School District terminated him for refusing to use pronouns that did not correspond with a student's biological sex and former teacher Vivian Geraghty who made similar allegations about her school district in Ohio.

Fox News Digital reached out to Alliance Defending Freedom and Brownsburg Community School Corporation.

CLICK HERE TO GET THE FOX NEWS APP

Brownsburg Community School Corporation said they do not comment on pending litigation, while Rory Gray, Alliance Defending Freedom Senior Counsel, provided the following statement:

"The 7th Circuit’s ruling shows why the Supreme Court needs to fix the standard for accommodating religious employees under Title VII," Gray said. "And it has the opportunity to do so in the Groff case, which is scheduled for argument later this month. Congress passed Title VII to prevent employers from forcing workers to abandon their beliefs to keep their jobs. In this case, Mr. Kluge went out of his way to accommodate his students and treat them all with respect. The school district even permitted this accommodation before unlawfully punishing Mr. Kluge for his religious beliefs. We are evaluating next steps in this case." 

The Associated Press contributed to this report.