The history of Fremantle Prison, a former Australian prison in Fremantle, Western Australia, extends from its construction as a prison for convicts, using convict labour, in the 1850s, through to its modern-day usage as a tourist attraction. The design for Fremantle Prison was based on the Pentonville Prison in Britain, and it would be the longest, tallest prison cell block in the southern hemisphere. Construction began in 1851, and was completed by the end of 1859. The prison was transferred to the colonial government in 1886 for use for locally sentenced prisoners. Following a Royal Commission held in 1898−99, some changes were made to Fremantle Prison, including knocking down the inner wall between two cells, introducing a prisoner classification system, and constructing internal walls in the main block to create four separate divisions. A new cell block, New Division, was completed in 1907 and occupied in 1908.
Following another Royal Commission investigation 1911, there were some rapid changes in prison policy. A new superintendent with outside experience, Hugh Hann, was appointed, and supported by the newly elected Labor government interested in penal reform. Fremantle Prison was partially used as a military gaol during both world wars. The World War II takeover necessitated the commissioning of Barton's Mill Prison in 1942, which remained opened after the war. Pardelup Prison Farm was another prison outstation established in 1927 to reduce overcrowding at Fremantle. Both facilities were part of reforms made to the prison system, but significant changes to the operation of Fremantle Prison did not begin until the 1960s. Comptroller General Colin Campbell introduced expedient prisoner assessments, officer training, work release programs, and social workers and welfare officers.
The government department in charge of the prison underwent several reorganisations in the 1970s and 1980s, but the culture of Fremantle Prison was resistant to change. Growing prisoner discontent culminated in a 1988 riot with guards taken hostage, and a fire that caused $1.8 million worth of damage. The prison closed in 1991, replaced by the new maximum-security Casuarina Prison. Since 1991, the prison has been conserved as a recognised heritage site on state, national, and World Heritage lists, and various restoration works have been undertaken since the 1990s. New uses have been found for various sections of the prison, including a New Business Enterprise Centre in the New Division cell block, and wedding ceremonies in the prison chapels. It has also become a significant tourist attraction, with guided tours since 1991.