(CNN) Dozens of Iowa inmates are challenging a new law that bans sexually explicit material in the state's nine prisons.

The state law , which took effect on July 1, eliminated a longstanding policy that created separate areas for inmates to view nude photos and other explicit materials, often referred to as "pornography reading rooms."

A provision of the law, which was not implemented until November 14, prevents inmates from receiving or possessing material that is sexually explicit or contains nudity, according to an Iowa Department of Corrections memo included in the inmates' lawsuit.

The lawsuit was filed in October in federal court on behalf of 58 inmates at the Fort Dodge Correctional Facility. The inmates claim the law was enacted under the guise of "morality" by "religious tyrants."

The suit argues that nudity and self-pleasure are not unnatural and that banning sexually explicit materials demonstrates "prejudice" against inmates by denying them a constitutional right.

Read More