Some older prisoners may be released after New South Wales passed a special COVID-19 bill.

NSW Attorney-General Mark Speakman says the bill passed this week allows Corrective Services commissioner Peter Severin to grant conditional parole to low-risk offenders where necessary.

The new law could see vulnerable inmates prioritised for potential release, focusing on “older inmates nearing completion of their sentence”.

The Australian Lawyers Alliance says every state and territory should follow the lead of NSW.

“Prisoners should be released from today, we shouldn't be waiting for an outbreak of this virus before it happens,” an alliance spokesperson told AAP.

Prisoner advocates say they doubt that social distancing is possible in some of the state's most crowded prisons.

“The social distancing advised by the government is not achievable if anyone is sharing a cell, which is still going on,” Justice Action co-ordinator Brett Collins said.

The NSW Police Association has warned that releasing prisoners into the community could “add fuel to a potentially already fast-burning fire”.

President Tony King said a new facility is ready to be opened on the north coast.

“This is not a genie that can be put back in the bottle easily once it is opened, and victims and the general public's safety should never be compromised,” Mr King said in a statement.

Meanwhile, one state in Germany is planning to release as many as 1,000 prisoners in order to free up cells to be used as quarantine rooms.