Pregnant women with fewer than six months on their sentences for non-violent offenses will be released from New York prisons, a top aide to Gov. Andrew Cuomo said Thursday.

In a statement, Cuomo secretary Melissa DeRosa said the Department of Corrections and Community Supervision began to release the inmates in an effort to prevent the spread of the coronavirus in the state’s prison system.

“We will continue to monitor the COVID situation as it impacts every aspect of our state, including prisons, and make adjustments as appropriate,” DeRosa said.

The state had previously moved to lift all technical parole violation warrants for those who are not considered public safety threats.

State prison officials are also releasing inmates who are 55 years old and older with less than 90 days to go on their sentences, as long as their underlying crime was not a violent felony or sex offense.

State records show 370 prison inmates have contracted the virus and 10 have died. Among prison staff, 1,060 people have tested positive for the virus and two have died.