Burghs were created in Scotland from the 12th century. They had the right to hold markets and levy customs and tolls, and tolbooths were originally established for collection of these.
Royal burghs were governed by an elected council, led by a
provost and
baillies, who also acted as
magistrates with jurisdiction over local crime. The tolbooth developed into a central building providing for all these functions. Most tolbooths had a bell, often mounted on a steeple, and later clocks were added. As well as housing accused criminals awaiting trial, and
debtors, tolbooths were also places of public punishment, equipped with a
whipping post,
stocks or
jougs. The tolbooth was occasionally a place of execution, and where victim's heads were displayed. The tolbooth may also have served as the guardhouse of the town guard. Other functions provided in various tolbooths included schoolrooms, weighhouses, storage of equipment and records, and entertainments. The first record of a tolbooth is at
Berwick upon Tweed in the later 13th century, and the earliest known grant of land for construction of a tolbooth is at
Dundee in 1325, with many more grants recorded through the 14th century. The oldest tolbooths which survive intact are those of
Musselburgh (1590) and
Canongate (1591). The tolbooth of
Glasgow (1634) has been described as Scotland's "most remarkable civic building of the 17th century". Other Renaissance-style tolbooths were erected at
Linlithgow (1668) and
Kirkcaldy (1678). By the 18th century, the term "tolbooth" had become closely associated with prison, and the term "town house" became more common to denote the municipal buildings. Classical architectural styles were introduced, as at
Dundee (1731) and
Sanquhar (1739). In the early 19th century, increasing separation of functions led to purpose-built courthouses and prisons, and the replacement of tolbooths and town houses with modern
town halls, serving as council chamber and events venue. ==Present==