A Utah substitute teacher has been fired after admonishing a fifth-grader who said he was thankful for being adopted by his two fathers, officials said.

The unidentified teacher was terminated after a probe into her Nov. 21 comments at Deerfield Elementary School in Cedar Hills, where she asked students one week ahead of Thanksgiving what they were thankful for this year, the Salt Lake Tribune reports.

“I’m thankful that I’m finally going to be adopted by my two dads,” one 11-year-old boy replied, causing the female educator to snap.

“Why on Earth would you be happy about that?” the teacher said, adding that “homosexuality is wrong” and “two men living together is a sin.”

The teacher then told the student directly: “That’s nothing to be thankful for.”

The unidentified woman was eventually escorted from the classroom after three girls walked to the principal’s office, the newspaper reports.

One of the boy’s fathers, Louis van Amstel, a former cast member on “Dancing with the Stars,” accused the teacher of bullying his son and said he was angry after the boy told him what happened.

“It’s absolutely ridiculous and horrible what she did,” van Amstel told the newspaper. “We were livid. It’s 2019 and this is a public school.”

Van Amstel identified the boy only as D.M. because his adoption has not yet been finalized. The boy’s fathers are now worried that the negative attention connected with the teacher’s comment may scuttle the adoption process, which is not final until Dec. 19, according to the newspaper.

It’s unclear how long the teacher had been working at the school or elsewhere in Utah. Kelly Services, a staffing company that provides substitutes to the Alpine School District, said in a statement Monday that it “made the decision” to end its relationship with the unidentified educator.

But there’s no statewide database that tracks substitutes who have been fired, meaning districts that don’t work with Kelly Services may not be advised not to hire her, a Utah State Board of Education official told the newspaper.