A UC Berkeley lecturer arrested on campus for allegedly soliciting lewd acts with an undercover officer has filed a federal class-action lawsuit, saying officers are engaging in discrimination because they never target suspects of the opposite sex.

The plaintiff, identified only as John Doe in court documents, said he was arrested in October 2010 after he signaled, by tapping his toe, that he was interested in “intimate conduct” with someone in an adjacent stall of a campus bathroom. The suit did not elaborate, but campus police logs said the incident happened in a men’s restroom in Dwinelle Hall.

The person in the adjoining stall turned out to be UC Berkeley police Officer Reza Pourfarhani, working undercover. After Pourfarhani “tapped back indicating his interest in sexual conduct,” the plaintiff sent him a note asking what he was interested in, the suit said. Pourfarhani sent back a note “with a smiley face” that read, “I could ask you the same thing,” according to the suit filed earlier this month in U.S. District Court in San Francisco.

After the officer suggested that they go outside, the two left the restroom, and the plaintiff was arrested for “loitering around a toilet intending to engage in or solicit a lewd act in public,” the suit said.

The plaintiff, a lecturer in the campus’ college writing programs, acknowledged that he had been seeking sex but said his arrest “was false” because he had never solicited any act “intending to perform it in public.” He said police had violated 14th Amendment’s equal protection clause because officers of one sex never target those of the other.

A judge dismissed the criminal charges against the plaintiff, said the suit, which seeks unspecified damages. It names the UC Board of Regents, UC Berkeley police, campus Police Chief Mitch Celaya, Pourfarhani and a second officer as defendants. The defendants have not responded in court.

The lecturer’s attorney, Bruce Nickerson, is seeking class-action status for the suit so he can represent other people who have been arrested by campus police in similar cases. Nickerson has filed similar suits in the past challenging arrests for public solicitations of sex, including one against San Rafael police that was later settled.