From the birth of modern civilization in 3rd millennia BC, almost every major ancient civilization used concept of prisons as a mean to detain and remove personal freedoms of incarcerated people. In those early periods of history, prisons were often used as a temporary stopgap before sentencing to death or life of slavery, but as time went on and our civilization developed, prisons started morphing into correctional facilitiesthat started implementing the concept of rehabilitation and reform of prisoners. In addition of holding convicted or suspected criminals, prisons were often used for holding political prisoners, enemies of the state and prisoners of war.
The earliest records of prisons come from the 1st millennia BC, located on the areas of mighty ancient civilizations of Mesopotamia and Egypt. During those times, prisons were almost always stationed in the underground dungeons where guilty or suspected criminals spent their life either awaiting death sentence, or a command to become slaves (often working as galley slaves). Exception from that rule comes from the home of modern democracy - Greece. There, prisoners were held in the poorly isolated buildings where they could often be visited by their friends and family. Primary source of their detention were not dungeons, high walls or bars, but simple wooden blocks that were attached to their feet. Ancient Roman Empire however continued to use harsher methods. Their prisons were built almost exclusively underground, with tight and claustrophobic passageways and cells. Prisoners themselves were held either in simple cells or chained to the walls, for life or for time. As slavery was accepted norm in those days, majority of prisoners that were not sentenced to death were sold as slaves or used by the Roman government as workforce. One of the most famous uses for the slaves in Roman Empire was as "gladiators". In addition to fighting in the arena (sometimes after lifetime of training in the special gladiator training houses, or Luduses), many slaves were tasked as a support workforce that enabled smoother run of the popular gladiator business. The most famous Gladiator battleground, the mighty ColosseumArena in Rome had a slave army of 224 slaves that worked daily as a power source of the complicated network of 24 elevators that transported gladiators and their wild animal opponents from the underground dungeons to the arena floor.
The conditions in the European prisons remained harsh until English royalty started being more involved with their justice system. Henry II commissioned the construction of first prison in 1166, together with the first draft of English legal system that used concept of jury. One of the most historic prison legislation was introduced in 1215, when King John signed Magna Carta which stated that no man could be imprisoned without trial. With the rise of the industry between 16 and 18th century English prisons became overcrowded, and new penal measures started being implemented - military pardon and penal transportations (during the end of 18th century, over 50 thousand prisoners were transported from England to penal colonies in North America and Australia). France even continued their practice of penal colonies until the middle of 20th century (most notably in French Guiana and its infamous prison Devil's Island), and Russia also used remote penal colonies in the frozen north-east Siberia.
The age of modern prisons that we know today started with the several prison reforms in 19th century England. During that time prisoners started receiving more care, concept of rehabilitation was introduced and governments around the world (especially in UK and US) started reconsidering their views on solitary confinement (which was primary source of the increased numbers of insane, suicidal and catatonic prisoners). Wars that engulfed the world in the beginning of 20th century brought the formation of large amounts of war prison camps and concentration camps. Most famous examples of those types of prisons happened during World War 2, when Nazi government formed over 300 detention centers in which political opponents, Jews, gypsies, criminals and others were detained without judicial process. Majority of them was eventually killed on an unprecedented massive scale that is today estimated to be between 11 and 17 million people.
During the end of 20th century, modern prison system was finalized. Concept of "Probation Service" was introduced in 1991, and three years before that first prison intended solely for the holding of inmates in permanent isolation was formed. Those "supermax" prisons became widespread across the entire United States, with over 40 of them being active in the year 2005. Inmates in those prisons are held in the 23h long periods of cell isolation, with occasional communal yard time, work, educational programs and meals in cafeteria. As of 2006, it is estimated that over 9 million people are imprisoned worldwide with