Less than two years after East Baton Rouge Parish sheriff’s deputies gained national attention for enforcing an invalid anti-sodomy law, Baton Rouge police Thursday arrested two men on the same unconstitutional statute.

While different from the cases in 2013, which involved a Sheriff’s Office sting and no actual sex, the alleged incident Thursday invoked the same unenforceable law.

Baton Rouge Police Chief Carl Dabadie Friday sent a departmentwide memo to remind officers not to arrest people using that statute, department spokesman Lt. Jonny Dunnam said. The arrests happened Thursday just after 2 a.m., when a Baton Rouge police officer was on patrol in Forest Community Park and found two men having sex in the backseat of a car, according to arrest reports. The men were in the park after hours, the reports say.

Both men, a 33-year-old and a 25-year-old, were booked into Parish Prison on counts of trespassing in a BREC Park and crimes against nature. One of the men was still in Parish Prison as of 2:30 p.m. Friday, booking records show.

East Baton Rouge Parish District Attorney Hillar Moore III said a district judge threw out the crimes against nature count after finding there was no probable cause.

The police department also recognized the mistake and had planned to drop the charges.

“The officers made a mistake,” Dunnam said. “The chief wants to send his apologies to those individuals for making that mistake and has contacted supervisors to make sure this doesn’t happen again.”

The department plans to go forward with the counts of trespassing in the park, Dunnam said.

Still, advocates for civil rights and the LGBT community expressed anger Friday that the men were booked on the charges in the first place, as Louisiana’s anti-sodomy law was struck down by the U.S. Supreme Court in 2003.

“It outrageous that we have people in this state sitting in jail accused of a crime that’s been declared invalid,” said Marjorie Esman, executive director of the ACLU in Louisiana. “The Baton Rouge Police Department needs to get the message that they can’t arrest people illegally.”

Law enforcement agencies were put on notice, she said, that the law was invalid after a 2013 investigation by The Advocate found at least 12 cases in which the Sheriff’s Office had used the unenforceable law to ensnare men who discussed or agreed to have consensual sex with an undercover agent.

While the alleged incident Thursday did not involve task forces or undercover officers, it was policed with a law used to “unfairly target” gay men, Esman said.

The Louisiana House in April rejected legislation that would have removed the anti-sodomy language from the law.

The arrests Thursday surprised Bruce Parker, coalition manager of Equality Louisiana, who said his group has not been able to find anti-sodomy arrests in the state outside Baton Rouge. “If Baton Rouge police said before they won’t enforce it, and if the court’s said they can’t enforce it, it’s beyond comprehension why they’re still enforcing it,” he said.

Follow Matt McKinney on Twitter, @Mmckinne17.