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.

Get Breaking News Delivered to Your Inbox

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.

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.