The gaol was a colonial prison building for York County, Maine and served as a jail from 1719 to 1879. The original portion of the jail was constructed using timbers from the earlier York jail built in 1656. It was built in four phases, including construction of its original stone cell portion in 1719. The present structure's shape was finalized when the building was enlarged in the 1790s in response to a demand for better conditions in debtor's prisons after an increase in debtors following the American Revolution. After 1879 the Gaol was used as a school, warehouse, and boarding house until 1900 when it opened as a colonial museum of relics. The Old Gaol continues to be a museum and reflects the jail and jailer's quarters as they were in 1789.