Military prison

A military prison is a prison operated by a military. Military prisons are used variously to house prisoners of war, unlawful combatants, those whose freedom is deemed a national security risk by the military or national authorities, and members of the military found guilty of a serious crime. There are two types: penal and confinement-oriented, where captured enemy combatants are confined for military reasons until hostilities cease. Most militaries have some sort of military police unit operating at the divisional level or below to perform many of the same functions as civilian police, from traffic-control to the arrest of violent offenders and the supervision of detainees and prisoners of war.

Australia
The Australian Defence Force states it has no prisons. Instead they have a single facility, the Defence Force Correctional Establishment, which aims to rehabilitate members who have been sentenced to detention for breaching military regulations or law; employees of the establishment are considered "instructors" rather than guards. Military personnel may be sent there for between 14 days' to two years' rehabilitation before returning to active duty; the average sentence is about 23 days. In addition, there are 15 detention centres located within military bases across Australia.

Canada
The Canadian Forces have one military prison, the Canadian Forces Service Prison and Detention Barracks (CFSPDB) (colloquially known as Club Ed), located at Canadian Forces Base Edmonton. Canadian Forces personnel who are convicted by military courts and receive a sentence of 14 days or more are incarcerated at CFSPDB. Men, although in the same prison, are kept separate from women. The prison is maintained and controlled by the Canadian Forces Military Police, although NCOs from various branches of the Canadian Forces serve at the prison as staff. Service personnel who are convicted of less serious offences are considered to be in "detention", and undergo a strict military routine aimed at rehabilitation for their return to regular military service, whereas personnel convicted of more serious offences are considered to be in "prison" and upon completion of their sentence they are released from the military. Serious offenders with sentences longer than two years are transferred to the Canadian federal prison system after serving 729 days, to complete their sentence in the civilian prison system, followed by release from the Canadian Forces. Any service personnel serving a sentence of 14 days or less are held in local base Military Police Detachment cells at the various Canadian Forces Bases within Canada.

Israel
The Israeli Military Prison is a prison for guarding soldiers who committed crimes during their service.

Italy
In Italy, only one military jail now exists: the Santa Maria Capua Vetere. Under Italian law, only those in government service (Army, Navy, Air Force, Guardia di Finanza and Carabinieri) who are under investigation in front of a military court or are sentenced to the penalty of Reclusione Militare by a military or civil court are held there. Those serving in the police corps (Polizia di Stato, Polizia Penitenziaria, Corpo Forestale dello Stato) are also held in military jail.

Switzerland
In Switzerland, there are no special military prisons. Sentences are to be served in civilian prisons.

United Kingdom
The United Kingdom has one military correctional facility. (It has no establishments that would be considered prisons.) The Military Corrective Training Centre (colloquially known as the Glasshouse after the former military prison in Aldershot), in the town of Colchester, is where non-commissioned servicemen and women who are convicted by military courts and sentenced to more than 28 days, but less than three years, will be incarcerated. Women, although in the same prison, are kept separate from men. The facility is maintained and controlled by the British Army's Military Provost Staff (Adjutant General's Corps). More serious offenders with longer sentences are transferred to HM Prison Service as part of their dishonourable discharge. There are three categories of prisoner:
 * Those from the Royal Navy (RN), Royal Marines (RM), British Army, and the Royal Air Force (RAF) who are to remain in the Services after sentence and will serve their detention in A Company.
 * Those from the RN, RM, British Army and RAF who are to be discharged after their sentence and will serve their detention in D Company.
 * Those held in Military custody awaiting the outcome of an investigation, or awaiting HM Prison or YOI placement.

United States
The United States military's equivalent to the county jail, in the sense of "holding area" or "place of brief incarceration for petty crimes" is known colloquially as the guardhouse or stockade by the United States Army and Air Force and brig by naval and marine forces. Members of the U.S. Armed Forces are subject to the Uniform Code of Military Justice and are convicted to confinement via courts-martial. The U.S. Armed Forces currently maintain several regional prisoner-holding facilities in the U.S. In the United States, differential treatment seems to be suggested, but by no means mandated, by the Founding Fathers in the Fifth Amendment to its constitution. In former times, criminals in the naval service were sent to the once-infamous Portsmouth Naval Prison, which was closed in 1974.

Organization
Today's American military prison systems are designed to house people who commit a criminal offense while in service. There is a distinction in the male and female prison organization system. Male military prisons have a tier system that is based on the length of a prisoner's sentence. Tier I prisoners have been sentenced up to one year. The army does not operate any tier I prisons. Tier II prisoners, with sentences of up to seven years, make up 65% of the incarcerated. Men sentenced to more than seven years, or for national security crimes, are confined in the USDB at Fort Leavenworth. This tier system based on sentence length differs from typical American prisons which are characterized by their level of security. For women this tier system does not exist. Women convicted of felonies are housed at Naval Consolidated Brig, Miramar located at the Marine Corps Air Station Miramar near San Diego, California.

Composition
Data from the Bureau of Justice Statistics breaks down military prisoners by five different military branches. As of 2020 the confined population by branch was 557 prisoners from the Army, 253 prisoners from the Marine Corps, 156 prisoners from the Navy, 7 prisoners from the Coast Guard, and 227 prisoners from the Air Force. 44 of these prisoners were military officers. A significant number of these prisoners are males, with only 54 being female. A plurality were Caucasian, followed by African Americans and Hispanics. Most of the crimes committed by military prisoners are violent offenses, with violent sexual crimes being 41.1% of the crime. The next most frequent crimes committed by military prisoners are drug-related offenses, followed by property offenses, such as theft. There are a small percentage of other crimes committed, such as military offenses. Military offense examples are disrespect, insubordination, and false offense statements. The most recent data from 2020 of military prisoners has shown a small drop from 1214 prisoners in 2019 to 1180 in 2020.

Incarceration of prisoners-of-war
The Geneva Conventions provides an international protocol defining minimum requirements and safeguards for prisoners of war. Prisoners are often kept in ad hoc camps near the battlefield, guarded by military police until they can be transferred to more permanent barracks for the duration of the conflict. Treatment has varied from age to age and nation to nation, the quality of conditions for prisoners often being linked with the intensity of the conflict and the resources of the warring parties.

In popular culture
Military prisons and the treatment of military prisoners have often figured prominently in modern literature, cinema and even politics. In the 19th century, written accounts of the barbaric treatment accorded prisoners on both sides during the Napoleonic and Crimean wars helped lead to the founding of the Red Cross and the promulgation of the Geneva Conventions.

There are numerous examples of 20th and 21st-century cinema dealing with military prisons. Stalag 17 (1953) portrays the struggles of a group of American airmen in a German Luftwaffe prison and is based on the play of the same name written by former prisoners of war. The Caine Mutiny (1954) deals with the military legal system during World War II. The Great Escape (1963), details the true-life adventures of a mixed group of Allied prisoners attempting to escape from a German Luftwaffe stalag. The Hill (1965) was set in a British military penal camp in North Africa during World War II. The Last Detail (1973) is a film that tells the story of two sailors assigned to a temporary detail transporting a prisoner. Andersonville (1996) and The Andersonville Trial (1970), both TV movies, dealt with the conditions at Andersonville Prison and its aftermath. The Last Castle (2001) shows a former U.S. Army general who is sent to a military prison after contradicting a direct order. Hart's War (2002) features American POWs in a German prison camp.

Some of the late-20th-century military novels of American writer W. E. B. Griffin make mention of the former Portsmouth Naval Prison facility.