Mitch Stein, a gay television producer living with his partner and two daughters in Pomona, Calif., had forgotten about some "fun" photos that he had posted online years ago.
One was a photo of the 36-year-old eating a corn dog at a fair and the other was a Halloween shot jokingly surrounded by drag queens.
But he believes those photos cost him his job last August as an assistant boys' water polo and swim coach at the Charter Oak Unified School District, where his 15-year-old biological daughter goes to school and is on the girls' team.
"I feel like they are fun photos taken with friends on my personal time, years before I even worked at Charter Oak," he told ABCNews.com.
Now, he claims in a wrongful termination lawsuit filed in Los Angeles County Superior Court this week, that he was fired because he was gay.
Stein said he had tried mediation, but the school did not agree.
"Obviously, my daughter goes to the school and I would rather their funds be used for something else," he said. "But I should have the same rights as any other parent."
The school district argues that the "sexual content" of the photos was offensive.
"Since the case is in litigation, I cannot comment except to say, as I have done in the past, that Mitch Stein was not terminated due to his sexual orientation," said Charter Oak Unified Superintendent Mike Hendricks in an email.
Stein has asked for an undetermined amount of punitive damages, a clean personnel record and his old job back, according to the lawsuit.
According to Stein, the Facebook and MySpace photos were sent to school principal Kathleen Wiard anonymously. He said he had never personally met her until the day she called him into the office to fire him, calling the photos "obscene."
He also said her questioning suggested that she falsely equated homosexuality with pedophilia.
ABCNews.com obtained the photos. One, showed Stein fully clothed being lifted up by five men in drag. In the other, he had an open mouth and was ready to eat a corn dog.
"As we know from Michelle Bachman, the ones of eating a hot dog make people look ridiculous," said Stein's Los Angeles lawyer, Brad Kane.
"My client was not immediately aware they were on the Internet," said Kane.
"They were years old. But taking them down was not sufficient. They terminated him because they didn't want 'people like you close to children.' What does that say?"
Kane said a local reporter had found a photo of a "drunk straight teacher" online and brought it to the attention of the school, but he was not disciplined.
The school has no policy on private posting of photos online, according to Kane. The employment application Stein signed also does not mention "sexual orientation," which is a protected class.
Stein said he was "openly gay" when he was hired by the district.
"I didn't say that in my job interview," he said. "I am open, but I don't walk up to people. It's a little irritating when you have the adjective in front of you -- 'gay coach' and 'gay father.'"