The Tolbooth was built in the early 1700s, (ignore the date of 1648 which has come from another building), as the town court and prison and was maintained by money raised from the tolls on the bridges across the rivers North and South Esk. Inside was a weigh-room used by excise men on market day to collect taxes. Apart from the ‘upper’ prison there is also a dungeon known as the “black hole”. Note the stone circle in front of the door: this marks the site of the last public hanging in Dalkeith. William Thomson was hanged there on 1 March 1827 for highway robbery. The building was later used by the Dalkeith Scientific Association as their lecture hall from 1835 to 1929.