A prison, also known as a correctional facility, jail, gaol (dated, British and Australian English), penitentiary (American English), detention center (American English), remand center, or internment facility (commonly used term in military theatres of war/involvement), is a facility in which inmates are forcibly confined and denied a variety of freedoms under the authority of the state. Prisons are most commonly used within a criminal justice system: people charged with crimes may be imprisoned until their trial; those pleading or being found guilty of crimes at trial may be sentenced to a specified period of imprisonment. In simplest terms, a prison can also be described as a building in which people are legally held as a punishment for a crime they have committed. A prison, also known as a correctional facility, jail, gaol (dated, British and Australian English), penitentiary (American English), detention center (American English), remand center, or internment facility (commonly used term in military theatres of war/involvement), is a facility in which inmates are forcibly confined and denied a variety of freedoms under the authority of the state. Prisons are most commonly used within a criminal justice system: people charged with crimes may be imprisoned until their trial; those pleading or being found guilty of crimes at trial may be sentenced to a specified period of imprisonment. In simplest terms, a prison can also be described as a building in which people are legally held as a punishment for a crime they have committed. Prisons can also be used as a tool of political repression by authoritarian regimes. Their perceived opponents may be imprisoned for political crimes, often without trial or other legal due process; this use is illegal under most forms of international law governing fair administration of justice. In times of war, prisoners of war or detainees may be detained in military prisons or prisoner of war camps, and large groups of civilians might be imprisoned in internment camps. In American English, prison and jail are usually treated as having separate definitions. The term prison or penitentiary tends to describe institutions that incarcerate people for longer periods of time, such as many years, and are operated by the state or federal governments. The term jail tends to describe institutions for confining people for shorter periods of time (e.g. for shorter sentences or pre-trial detention) and are usually operated by local governments. Outside of North America, prison and jail have the same meaning. Common slang terms for a prison include: 'the pokey', 'the slammer', 'the can', 'the clink', 'the joint', 'the calaboose', 'the hoosegow' and 'the big house'. Slang terms for imprisonment include: 'behind bars', 'in stir' and 'up the river' (a possible reference to Sing Sing). The use of prisons can be traced back to the rise of the state as a form of social organization. Corresponding with the advent of the state was the development of written language, which enabled the creation of formalized legal codes as official guidelines for society. The best known of these early legal codes is the Code of Hammurabi, written in Babylon around 1750 BC. The penalties for violations of the laws in Hammurabi's Code were almost exclusively centered on the concept of lex talionis ('the law of retaliation'), whereby people were punished as a form of vengeance, often by the victims themselves. This notion of punishment as vengeance or retaliation can also be found in many other legal codes from early civilizations, including the ancient Sumerian codes, the Indian Manusmriti (Manava Dharma Sastra), the Hermes Trismegistus of Egypt, and the Israelite Mosaic Law. Some Ancient Greek philosophers, such as Plato, began to develop ideas of using punishment to reform offenders instead of simply using it as retribution. Imprisonment as a penalty was used initially for those who could not afford to pay their fines. Eventually, since impoverished Athenians could not pay their fines, leading to indefinite periods of imprisonment, time limits were set instead. The prison in Ancient Athens was known as the desmoterion ('place of chains'). The Romans were among the first to use prisons as a form of punishment, rather than simply for detention. A variety of existing structures were used to house prisoners, such as metal cages, basements of public buildings, and quarries. One of the most notable Roman prisons was the Mamertine Prison, established around 640 B.C. by Ancus Marcius. The Mamertine Prison was located within a sewer system beneath ancient Rome and contained a large network of dungeons where prisoners were held in squalid conditions, contaminated with human waste. Forced labor on public works projects was also a common form of punishment. In many cases, citizens were sentenced to slavery, often in ergastula (a primitive form of prison where unruly slaves were chained to workbenches and performed hard labor). During the Middle Ages in Europe, castles, fortresses, and the basements of public buildings were often used as makeshift prisons. The possession of the right and the capability to imprison citizens, however, granted an air of legitimacy to officials at all levels of government, from kings to regional courts to city councils; and the ability to have someone imprisoned or killed served as a signifier of who in society possessed power or authority over others. Another common punishment was sentencing people to galley slavery, which involved chaining prisoners together in the bottoms of ships and forcing them to row on naval or merchant vessels. The influence of French philosopher Michel Foucault; especially his book Discipline and Punish: The Birth of the Prison (1975) has energized the historical study of prisons and their role in the overall social system. Discipline and Punish: The Birth of the Prison is an analysis of the social and theoretical mechanisms behind the changes that occurred in Western penal systems during the modern age based on historical documents from France. Foucault argues that prison did not become the principal form of punishment just because of the humanitarian concerns of reformists. He traces the cultural shifts that led to the predominance of prison via the body and power. Prison used by the 'disciplines' – new technological powers that can also be found, according to Foucault, in places such as schools, hospitals, and military barracks.