The mass discharge is part of an effort to undo some of the prison overcrowding caused by the harsh penalties handed down to nonviolent drug dealers in the 1980s and 1990s. Many of the discharged convicts are undocumented immigrants who will be deported.