A debtors' prison is a prison for people who are unable to pay debt. Until the mid-19th century, debtors' prisons were a common way to deal with unpaid debt in Western Europe. Destitute people who were unable to pay a court-ordered judgment would be incarcerated in these prisons until they had worked off their debt via labour or secured outside funds to pay the balance. The product of their labour went towards both the costs of their incarceration and their accrued debt. Increasing access and lenience throughout the history of bankruptcy law have made prison terms for unaggravated indigence obsolete over most of the world.