Updated

New Hampshire's highest court has upheld the convictions of three women arrested for going topless on a New Hampshire beach.

In a 3-2 ruling Friday, the state's Supreme Court found the city of Laconia's ordinance does not discriminate on the basis of gender or violate the women's right to free speech. In a dissenting opinion, two judges argued the ordinance was unconstitutional because it treats men and women differently.

Heidi Lilley, Kia Sinclair and Ginger Pierro are part of the Free the Nipple campaign. They were arrested in 2016 after removing their tops at a beach in Laconia and refusing to put them on when beachgoers complained.

Pierro was doing yoga while the other two women were sunbathing.

The women argued this was a form of gender-based discrimination because men don't have to follow the same rules. The law's supporters argue it helps prevent public disturbances.

5 NUDE BEACHES RIGHT HERE IN THE US

The Laconia law bans sex and public nudity. Women are prohibited from “showing of female breast with less than a fully opaque covering of any part of the nipple.”

"We are extremely disappointed in the Court’s ruling that treating women differently than men does not amount to sex discrimination. The court has effectively condoned making it a crime to be female,” the women’s lawyer, Dan Hynes, said in a statement. “Since the N.H. Constitution, which prohibits sex discrimination, was not enough to prevent this unequal, and unfair treatment, we are hopeful the New Hampshire legislature steps up to correct this injustice by outlawing Laconia’s ordinance.”

Hynes said he would talk to his clients about their next step, which could include appealing the ruling to the U.S. Supreme Court.

CLICK HERE TO GET THE FOX NEWS APP

The state attorney general's office defended the law in court but did not comment on the ruling. It argued the law was tailored to require only the covering of nipples and that the city was trying to avoid potential disturbances that could result from bare-breasted women on the beach.

Similar court cases have had mixed results. A federal judge in 2017 ruled a Missouri law didn't violate the state constitution by allowing men, but not women,  to show their nipples. That same year a federal court block a Colorado city from enforcing a law barring women from going topless.

The Associated Press contributed to this report.