Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

By The Associated Press

DENVER — A Colorado judge has blocked a college town's law against women going topless, saying the law is likely unconstitutional.

U.S. District Judge R. Brooke Jackson said Tuesday that Fort Collins' ordinance is based on gender discrimination and issued an injunction against its enforcement.

Fort Collins' indecency code makes it a crime for women but not men to show their nipples.

Brit Hoagland, right, talks during a news conference in Denver, Colo., May 31, 2016. Hoagland along with Samantha Six plaintiff's in a federal lawsuit they filed on Tuesday challenging Fort Collins' indecency code, which makes it a crime for women but not men to show their nipples. P. Solomon Banda / AP

The law "perpetuates a stereotype engrained in our society that female breasts are primarily objects of sexual desire, whereas male breasts are not," Jackson wrote.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: Women, and Men, Doff Their Shirts Around World for 'Go Topless Day'

Jackson accused city council members of falling prey to discriminatory thinking when they voted unanimously in 2015 to keep a law that prohibits the display of female breasts, rejecting a growing movement to remove gender-specific indecency codes.

"The naked female breast is seen as disorderly or dangerous because society, from Renaissance paintings to Victoria's Secret commercials, has conflated female breasts with genitalia and stereotyped them as such," Jackson wrote.

"The irony is that by forcing women to cover up their bodies, society has made naked women's breasts something to see."

The hometown of Colorado State University had no cases on record of women being charged with the crime of going topless.

And the city did make an exception for nursing mothers.

But otherwise it was a $250 fine for a woman over the age of 10 in Fort Collins to display her breast "below the top of the nipple."

Two women sued over the Fort Collins topless ban. Other cities in Colorado, including Denver, have no gender-specific indecency laws.

The plaintiffs' lawyer, David Lane, said Tuesday that he wasn't surprised the judge blocked Fort Collins' law.

"My clients take a position that any statute with the words 'Women are prohibited from.' is unconstitutional, and I agree with them. Apparently so does a federal judge," Lane said in a statement Tuesday.