(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.
"What is next -- outlawing of models wearing fashion/swimsuit/lingerie?" it says.
The lawsuit asks the court to award each inmate plaintiff $25,000.
But the old policy on pornographic materials drained resources, Michael Savala, general counsel for the Iowa Department of Corrections, told the Des Moines Register in January.
He said it required staff members to screen the material in mail rooms and then check it out to inmates. Staff members also had to escort inmates to the private room and inspect the material to make sure no pages were missing and that it did not contain contraband.
Moreover, Savala said, the material did not promote the "pro-social thinking and behavior" the department encourages or support "our responsibilities to change the mindset of the offender as they transition back into the community."
The state has nearly 8,600 inmates, according to the corrections department.
The inmates have until Friday to each pay a $350 filing fee for the case to proceed or file a request that the fee be waived. US District Judge Robert Pratt also told the plaintiffs they must each file a new complaint specific to their unique claims or the case will be dismissed.
A spokesman for the Iowa Department of Corrections declined to comment on the suit.
"While we aren't surprised that the statute passed by the Iowa legislature is facing a potential challenge in court, the department does not comment on pending litigation," said communications director Cord Overton.