ALBANY, N.Y. — New York is going to restrict the use of solitary confinement in state prisons, despite failing to pass legislation that would have prohibited putting a prisoner in isolation for more than 15 consecutive days.

Gov. Andrew Cuomo, Senate Majority Leader Andrea Stewart-Cousins and Assembly Speaker Carl Heastie said Thursday they've agreed to "dramatically reduce" the use of solitary confinement by implementing changes administratively. All three are Democrats.

The deal would prohibit certain "vulnerable" prisoners from being put in solitary, including pregnant women and adolescents.

In a news release, they said they would "ultimately" cap the amount of time prisoners can spend in solitary confinement to 30 days.

There are about 47,000 inmates in state's prisons. The deal wouldn't affect county and city jails.