The Californian city of San Leandro and its police department are being sued in federal court, and are accused of violating the civil rights of gay men, by conducting undercover sting operations, hoping to stop cruising in a public restroom.

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

The restroom, near the San Leandro Marina, was targeted by the sting operation, but legal experts have suggested that the operation could be argued as discriminatory, as it only targeted gay men.

Prostitution was never a factor in any of the cases cited by the lawsuit, and the operation was purely attempting to stop cruising in the area.

The lawsuit was filed against San Leandro by Steven Mengel and Michael Woody, and accused city officials of specifically targeting only gay men.

It goes on to argue that the men were caused emotional distress by distributing news releases identifying them, and notifying the public of the reason they were arrested.

Mr Woody was arrested in June 2012, but never charged with a crime, and Mr Mengel was arrested and charged also in June 2012, but the case was dismissed by Alameda County judge in November.

The attorney representing the pair, Bruce Nickerson, said he had found no evidence that officials had not conducted similar operations targeting straight couples.

“They only make these arrests for male-male conduct,” he said. “It’s outrageous. It’s discriminatory.”

Peter Renn, a staff attorney at Lambda Legal, which advocates for human rights, agreed that there was no evidence to show that heterosexual people had been targeted by the operation.

“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.”

He went on to argue that it was also troublesome that city would publicise arrests, despite there being not enough evidence to convince the district attorney to file criminal charges.

“Publicising 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.”