EVERETT, Wash. (AP) — A Washington city’s dress code ordinance saying bikini baristas must cover their bodies at work has been ruled unconstitutional by a federal court.

The decision in a partial summary judgment this week comes after a lengthy legal battle between bikini baristas and the city of Everett over the rights of workers to wear what they want, the Everett Herald reported. Everett is about 30 miles (50 kilometers) north of Seattle.

U.S. District Court in Seattle found Everett’s dress code ordinance violated the Equal Protection clauses of the U.S. and Washington state constitutions. The Court found that the ordinance was, at least in part, shaped by a gender-based discriminatory purpose, according to a 19-page ruling signed by U.S. District Judge Ricardo S. Martinez.

It is difficult to imagine, the court wrote, how the ordinance would be equally applied to men and women in practice because it prohibits clothing “typically worn by women rather than men,” including midriff and scoop-back shirts, as well as bikinis.

Bikini baristas were “clearly” a target of the ordinance, the court also ruled, adding that the profession is comprised of a workforce that is almost entirely women.

In 2017, the city enacted its dress code ordinance, requiring all employees, owners and operators of “quick service facilities” to wear clothing that covers the upper and lower body. The ordinance listed coffee stands, fast food restaurants, delis, food trucks and coffee shops as examples of quick service businesses.

The owner of Everett bikini barista stand Hillbilly Hotties and some employees filed a legal complaint challenging the constitutionality of the dress code ordinance. They also challenged the city’s lewd conduct ordinance, but the court dismissed all the baristas’ claims but the dress code question.

The court directed the city of Everett to meet with the plaintiffs within 14 days to discuss next steps.