Advocates for allowing women to go topless at a popular Maryland beach destination urged an appeals court Wednesday to reject Ocean City’s “morality code” and declare its ban on bare-chested women unconstitutional.

The U.S. Court of Appeals for the 4th Circuit is reviewing a decision from last spring that upheld the town’s law barring women, but not men, from going topless at the beach to protect “public sensibilities.”

Chief Judge Roger L. Gregory expressed skepticism during the Wednesday hearing about Ocean City’s rationale for the measure and the breadth of public concerns over topless sunbathing. He asked how many calls town officials received complaining about the possibility of women baring their chests and noted that the ordinance was passed after an inquiry to police about what would happen if women “expressed their freedom in this manner on the beach.”

Public sensibilities and legal standards have changed over time, Gregory said, pointing to Supreme Court decisions overturning laws that criminalized interracial marriage and sexual activity between same-sex adults.

“We’re not in the same Neanderthal-type environment,” Gregory said.

In response, Ocean City’s attorney Bruce F. Bright said the ordinance is “not a regulation of sexual choices or behavior. This is a regulation of public nudity and whether it should still be defined as exposure of the female breast.”

Judge A. Marvin Quattlebaum Jr. seemed to agree with the town’s view that the feedback elected officials receive from concerned residents should count for something when it comes to local legislation.

“We may think it’s good or bad, but the question is what are the moral sensibilities?” Quattlebaum said.

The outcome of the case could come down to the position of the third judge on the panel, Barbara Milano Keenan, who did not ask a question during oral arguments Wednesday.

Last April, U.S. District Judge James Bredar upheld the measure, saying in part that he was bound by past court rulings.

“Protecting the public sensibilities from the public display of areas of the body traditionally viewed as erogenous zones — including female, but not male, breasts — is an important government objective,” Bredar wrote.

The case began when five Maryland women sued the resort town over the 2017 measure, thrusting Ocean City into a debate about gender equity. The challengers say the law unfairly targets women in violation of the Constitution’s guarantee of equal protection.

Ocean City officials have defended the ordinance, telling the court that it is necessary to maintain the town’s family-friendly character and that it reflects public sentiment.

The lawsuit is one of several throughout the country challenging similar laws. In Colorado, the federal appeals court ruled against a Fort Collins ban and declared the city’s ordinance unconstitutional. The City Council decided not to seek review by the Supreme Court. Separately, the justices refused last year to take up a challenge to a similar New Hampshire law in a case brought by three women fined for exposing their breasts in public.

In the Ocean City case, the attorney for “topfreedom” advocate Chelsea Eline told the appeals court that times have changed and urged the three-judge panel to overturn precedent.

“The equal protection clause is supposed to protect everybody,” said attorney Devon M. Jacob. He took issue with the notion of “public moral sensibility,” calling it an “amorphous term that no one seems to be able to define. It basically means people were uncomfortable.”

Jacob said that the ordinance imposes the “sexist ideologies of a very small group of people on the masses” and that the town’s “morality code” was not targeting a particular problem.

He noted that the Supreme Court has directed lower courts in recent years to apply more scrutiny when physical differences between men and women are used to justify gender-based measures.

The ordinance makes public nudity a municipal infraction punishable by a fine of $1,000 and enforceable by the local beach patrol.

Ocean City’s attorney said it is the role of elected officials to “take the temperature of the public” and to legislate on that basis. The only two people who testified at the hearing to review the measure spoke in favor of the ban.

“The sensibilities of folks in Ocean City is and has always been consistent” with the ban, Bright told the court.

Read more: