(05-05) 14:35 PDT SAN DIEGO -- A state appeals court has upheld the dismissal of a San Diego schoolteacher who was fired for posting a sexually explicit ad and photos in the "men seeking men" section of Craigslist.

Frank Lampedusa's firing had been overruled by a state commission that said the ad was unrelated to his ability to teach middle-school students. But the appeals court disagreed, saying Lampedusa's conduct showed he was unfit to teach and "serve as a role model" for his students.

A teacher's private life can constitute grounds for dismissal if it demonstrates "indecency and moral indifference," said the Fourth District Court of Appeal in San Diego. The court issued the 3-0 ruling last month and published it Tuesday as a statewide precedent for future cases.

Lampedusa, 47, has worked for the San Diego district since 1999 and at Farb Middle School since 2004, where he has also handled disciplinary cases as the school's dean of students. He has continued to teach while the district appealed his case.

The court said an anonymous caller who described himself as the father of a Farb student told a police dispatcher in June 2008 about Lampedusa's ad on Craigslist.

It solicited oral and anal sex, in graphic terms, and included photos of Lampedusa's face and private parts, the court said. The ad did not contain his name or contact information, which could be obtained only through Craigslist. Users of the Website were required to state that they were at least 18.

Lampedusa removed the ad two days later at the request of the school superintendent, who had been contacted by police. He was fired in November 2008.

Testifying to the state Commission on Professional Competence, where he appealed his firing, Lampedusa said he had posted five or six such ads in the past, considered them adult and private and did not believe they were immoral. He said he assumed students would follow the Craigslist directions to stay off the website and that parents would monitor their children's Internet usage.

The commission, in a June 2009 decision, described the ad as "vulgar and inappropriate" but said there was no evidence that any student, parent or teacher had seen it or that it had any bearing on Lampedusa's fitness to teach. A Superior Court judge agreed but was overruled by the appeals court.

The court pointed out that the person who reported the ad identified himself as a parent, and that the school principal had said it caused her to lose confidence in Lampedusa.

"Lampedusa's public posting of his pornographic ad is inconsistent with teaching middle-school students and serving as an administrator," Justice Gilbert Nares said in the court's ruling. He also said Lampedusa, in his testimony, had "shifted responsibility to parents and students" to avoid the site.

Lampedusa's lawyer was unavailable for comment on the ruling.

Jose Gonzales, a lawyer for the district, said the court recognized the special responsibilities of schoolteachers. "Like judges and police officers," he said, teachers "are held to a higher standard of off-duty conduct ... because of their critical function in our government."