RALEIGH, N.C. — Four prisoners being held in solitary confinement are suing the state of North Carolina over its use, saying the punishment is unconstitutional because it's cruel or unusual.

North Carolina Prisoner Legal Services and the American Civil Liberties Union of North Carolina filed the class-action lawsuit Wednesday in Superior Court. It's filed on behalf of the four men and others held in solitary confinement for 22 hours to 24 hours a day in cells described as no bigger than a parking space with little human contact.

The groups say about 3,000 people were being held in some form of solitary confinement in North Carolina as of July and that hundreds are held for months or years.

NEVER MISS AN ALERT: Click here to download the WCNC news app

The state Department of Public Safety didn't immediately respond to emails seeking comment.

RELATED: Beat of Life: Nashville songwriters help York County inmates share their stories

RELATED: 18 inmates baptized at South Carolina jail