Prison. A prison, also known as a jail or gaol, penitentiary, detention center, correction center, correctional facility, lock-up or remand center, 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, the terms prison and jail have separate definitions, though this is not always followed in casual speech. A prison or penitentiary holds people for longer periods of time, such as many years, and is operated by a state or federal government. A jail holds people for shorter periods of time and is usually operated by a local government. Outside of North America, prison and jail have the same meaning. Slang terms for a prison include: the pokey, the slammer, the cage, the hole, the can, the clink, the joint, the calaboose, the hoosegow, crowbar hotel and the big house. Slang terms for imprisonment include: behind bars, in stir and up the river. 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, 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, 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 punishment. 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. 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. 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.