The number of Americans in state and federal prisons has exploded over the last three decades, to the point that nearly one in every 200 people is behind bars. And though the rate of growth has slowed, and even declined over the last five years, the tough-on-crime policies and longer sentences that have sent prison rates skyward present a huge problem for states: Where do they put all those people?

That problem is especially acute in 17 states where the prison population is now higher than the capacity of the facilities designed to hold them. Those states, still recovering from a recession that decimated budgets, have to decide whether to build facilities with more beds, turn to private contractors, relax release policies — or simply stuff more prisoners into smaller spaces.

At the end of 2013, Illinois was housing 48,653 prisoners, according to data published by the Bureau of Justice Statistics. The state’s prison facilities are designed to hold just 32,075 prisoners, meaning the system is operating at 151 percent of capacity. North Dakota’s 1,571 prisoners live in space meant for 1,044 people, 150 percent of capacity.

Nebraska, Ohio, Delaware, Colorado, Iowa and Hawaii are all holding a prison population equal to more than 110 percent of capacity.

What scares states the most is the prospect of federal courts intervening and ordering new action. California has been under court order since 2009 to reduce its prison population, which is far beyond capacity. The state has spent billions housing inmates in county jails or sending them to facilities run by private for-profit companies.

“No state actively wants the federal courts to come in and take over operation of their state government functions,” said Adam Gelb, director of the Public Safety Performance Project at the Pew Charitable Trusts.

The possibility of federal court intervention has spurred Alabama to begin reviewing its corrections procedures. A Justice Department investigation released in January found conditions at the state’s women’s prison violate the Constitution, and DOJ said it would look into conditions at other state prison facilities.

In June, Alabama Gov. Robert Bentley (R) launched the Justice Reinvestment Initiative to study the state’s criminal justice system and make recommendations for easing overcrowding. The state’s prison facilities are designed to house 13,318 inmates, though operationally the facilities can hold 26,145 people. The current prisoner population, 26,271 inmates, is 197 percent of the lowest possible capacity and 100.5 percent of the highest number.

Court intervention “has been a powerful motivator over the last couple of years for Alabama to tackle its situation, independent of all the in-state concerns with overcrowding,” Gelb said.

Next door Mississippi has a far lower prisoner population than Alabama, with just 15,591 inmates at the end of 2013. The Mississippi corrections department has enough space to house 25,691 inmates, meaning it is operating at just over 60 percent capacity, the second-lowest rate in the nation. Only New Mexico, where the prison population is at 51 percent of capacity, has a lower rate.