The erection of the old gaol was commenced in 1813, shortly after the founding of Grahamstown (1812). In 1814 one of the walls of the gaol served as a line for the surveying of the main street, and thus also as the basis for the layout of the whole town. The building was completed in 1818, but served as a school after 1824 and later also as the first local public school until 1863.