The Royal Burgh of Haddington is a community in East Lothian, Scotland. It is the main management, cultural and geographical centre for East Lothian, which as a result of late-nineteenth century Scottish local government reforms took the type of the county of Haddingtonshire through from 1889-1921. It exists about 17 miles (27 km) eastern of Edinburgh. The name Haddington is Anglo-Saxon, dating from the 6th or 7th century AD when the location was included into the kingdom of Bernicia. The town, like the remainder of the Lothian area, was ceded by King Edgar of England and entered into Scotland in the tenth century. Haddington got burghal status, among the earliest to do so, during the reign of David I (1124-- 1153), providing it trading legal rights which motivated its growth right into a market town. Today Haddington is a small town with a population of fewer than 10,000 individuals; although during the High Middle Ages, it was the fourth-biggest city in Scotland after Aberdeen, Roxburgh and also Edinburgh. In the middle of the community is the Town hall, constructed in 1748 according to a plan by William Adam. When initially built, it inheld a council chamber, prison and constable court, to which assembly rooms were added in 1788, as well as a new clock in 1835. Close-by is the Corn Exchange (1854) and also the County Courthouse (1833 ). Various other nearby notable websites include the Jane Welsh Carlyle House, Mitchell's Close and the birth place of author and also federal government reformer Samuel Smiles on the High Street, marked by a celebratory plaque.