SAN LEANDRO -- The city and its police department are being sued in federal court for allegedly violating the civil rights of gay men by having officers conduct undercover sting operations in hopes of stopping sexual activity in a restroom near the San Leandro Marina.

The lawsuit, filed on behalf of two men arrested during an undercover sting, could eventually represent dozens of gay men who were arrested for attempting to conduct a lewd act in public but never charged with a crime.

Prostitution was not a factor in any of the cases cited in the federal lawsuit.

Claims against the city and police department stem from city officials' attempts to thwart an activity commonly known as cruising, in which gay men congregate in a public area in hopes of finding a partner for sexual activity.

While it's technically illegal to engage in sexual activity in a public place, targeting only gay men for the activity is troublesome and could be a valid example of discrimination, legal experts said.

In the lawsuit filed against San Leandro, Steven Mengel and Michael Woody accused city officials of purposely targeting only gay men in its effort to stop sexual activity in public places.

Furthermore, the men claim that the city caused emotional distress by distributing news releases identifying them and notifying the public that they had been arrested for attempting to conduct a lewd act in public.

Mengel was arrested and charged with a crime in June 2012 but had his case dismissed by an Alameda County judge in November. Woody was also arrested in June 2012 but never charged with a crime.

Bruce Nickerson, the attorney representing the men, said he has found no proof yet that San Leandro has conducted similar undercover operations against heterosexual couples. If that is the case, Nickerson said, then San Leandro is discriminating against gay men.

"They only make these arrests for male-male conduct," Nickerson said. "It's outrageous. It's discriminatory."

Peter Renn, a staff attorney with Lambda Legal, which advocates for gay and lesbian causes, said that if there is no evidence showing that San Leandro has targeted heterosexual couples in a similar manner then it's likely discrimination.

"If there are no arrests for heterosexual lewd conduct then that is certainly eyebrow-raising. If that is what is happening it's illegal," Renn said. "All of us have the right to equal treatment from the government."

Renn said it is also troubling that San Leandro would publicize the arrests even though there was not even enough evidence to convince the district attorney to file criminal charges.

"Publicizing the arrest has the effect of harassing and publicly humiliating someone who may very well be innocent," he said. "People shouldn't be tried and convicted through press releases."

San Leandro officials did not return requests for comment.