In the latest sign of a decades-long retrenchment, Pennsylvania plans to close a section of Norristown State Hospital that houses 122 people and temporarily use some of the beds for people from the criminal justice system, the state Department of Human Services said Wednesday.

Hamburg State Center, a residential facility for people with intellectual and physical disabilities in Berks County, is also slated for closure, the department said. Hamburg has 80 residents on its 154-acre campus.

The Hamburg center employs 353. The state employs 381 in the Norristown civil unit that is closing.

The closures, part of a nationwide, decades-long effort to shift care from institutions to community settings, are expected to take up to two years to complete, the department said.

"The announcement today is a very big deal," said Peri Jude Radecic, chief executive of Disability Rights Pennsylvania, an advocacy group in Harrisburg. "This is the result of decades of movement away from institutional living, both around the country and in Pennsylvania."

Over the last two decades, the number of residents in Pennsylvania's state centers for the intellectually and developmentally disabled fell from nearly 3,000 to 888 now at five centers, DHS said. Some states have no facilities of this type, DHS said.

The annual average cost for an individual at Hamburg is $488,000, compared with a range of $120,000 to $200,000 for the same person in a private, intermediate-care facility, the state said.

Similarly, on the mental-health side, the population in state hospitals has fallen steeply in the last 20 years, from nearly 5,000 to 1,586, the state said. Pennsylvania has six state mental hospitals, including Norristown. Allentown State Hospital was the most recent to close, in 2010.

Under the DHS plan, Wernersville State Hospital, west of Reading in Berks County, will take on the patients from Southeastern Pennsylvania who would have gone to Norristown.

A study published by Allegheny HealthChoices Inc. five years after the closure of Mayview State Hospital in Allegheny County found that it cost 77 percent less to care for people in the community than in the hospital.

The plan to close a large section of Norristown State Hospital came about a year after the DHS signed a settlement agreement with the ACLU of Pennsylvania over treatment delays for defendants whom the courts had ordered be given mental-health care. But the changes in Norristown are not in response to that settlement, the state said.

Under the agreement, Pennsylvania agreed to add nearly 200 treatment slots, including at least 50 in supportive housing in Philadelphia, to lower wait times that average more than a year.

"They've added about 100," said Witold Walczak, legal director for the ACLU of Pennsylvania. "For reasons they cannot explain, it has not reduced either the number of people waiting or the wait times."