Ocean City, Md., in 2014. (Bill O'Leary/The Washington Post)

In 1991, a federal appeals court determined that exposing female breasts in public offends moral sensibilities, giving the government the legal right to force women, but not men, to keep their tops on.

Almost 30 years later, have times changed?

It was one of the central questions debated before a federal judge in Maryland on Friday as Ocean City officials defended their ban on bare female chests at the beach. The hearing in U.S. District Court in Baltimore was the latest in the legal battle between the popular resort destination — which says it wants to protect its family-friendly image — and a Maryland woman who says the ban violates equal-protection laws.

The arguments Friday centered on whether an emergency ordinance the town approved in summer 2017 accurately “reflected public sensibilities” when it declared bare female breasts in public were “still seen by society as unpalatable.”

The town told U.S. District Judge James K. Bredar that an outpouring of calls, emails and complaints to elected officials demonstrated that public sensibilities were offended by the idea of topless women on its beach.

Ocean City Mayor Richard Meehan said that as word of the controversy over the ban spread, he and council members were inundated by concerns from visitors and residents. Many worried the “total character of Ocean City was going to change,” Meehan said. They threatened to cancel reservations and never return to Ocean City, whose industry is tourism.

“People were astounded by this,” Meehan said. “They were very upset.”

But the plaintiffs challenging the law argued that the roughly 150 emails and complaints sent to city officials represent a sliver of the 8 million people who visit the beachside town annually.

“I don’t believe that a tiny fraction that speaks out . . . is necessarily a reflection of public sensibilities,” said attorney Devon Jacob, representing the five women challenging Ocean City’s ordinance.

The case started when Chelsea Eline, a regular beachgoer who runs a blog called Breasts are Healthy, asked the city to give thebeach patrol and police officers clearer instructions so women could sunbathe bare-chested without confrontation. When the controversy generated national attention, Ocean City officials passed an emergency ordinance banning bare female chests in public. Officials said it was designed to “protect public sensibilities” and the beach town’s family-friendly atmosphere.

The Maryland Attorney General’s Office said the law is legally sound. But Eline challenged the ban and sued in federal court.

Friday’s hearing was aimed to help Bredar, the judge, determine whether the town should temporarily halt enforcement of the ordinance as Eline’s lawsuit proceeds. The judge did not indicate when he would issue his writtenopinion.

Eline argues that allowing men to go without shirts in public and not women is sexist. Women have the legal right to be bare-chested in public — and for purposes other than breast-feeding — anywhere men are, she and four other plaintiffs in the suit contend.

“The gender classification does not further an important government interest, but rather codifies long-standing discriminatory and sexist ideology,in which women are viewed as inherently sexual objects without the agency to decide when they are sexual and when they are not” according to the federal complaint filed by attorneys representing Eline.

Debby Herbenick, a professor of public health and human sexuality at Indiana University, testified for the plaintiffs. She said the Ocean City ordinance “overstated differences between the male and female breasts the way we understand them scientifically.” Male and female breasts are generally not different in appearance or function, she said. In some cases, men have bigger breasts than women and most people “don’t view their breasts as sexual all the time.”

Herbenick noted that breast cancer awareness campaigns from the 1980s and a recent push to increase the number of mothers who breast-feed have created a “greater acceptance of the female breast.”“In this day and age, still at this time,” Meehan said, “there is a difference.”

Ocean City Council member Mary Knight testified she was bombarded with messages, phone calls and conversations in public with citizens concerned about the town allowing bare-chested women on the beach. She said those messages helped her determine what public sensibilities in Ocean City were.

“People were inundating us with calls and concerns, newspaper articles . . . we did what we thought was right,” Knight said. “We did everything that we needed to do.”

In questioning the mayor, Jacob suggested banning female bare chests in the name of protecting families didn’t jibe with a town that allowed drinking and bars with names like “Brass Balls,” “Hooters” and “The Bearded Clam.”

But the mayor said families frequent some of those establishments and drink. A bare female breast, he said, was not the same as a bare male breast.