"The Royal Burgh of Haddington (Scots: Haidintoun) is a town in East Lothian, Scotland. It is the main administrative, cultural and geographical centre for East Lothian, which as a result of late 19th century Scottish local government reforms, actually took the form of the county of Haddingtonshire for the period from 1889 to 1921. It lies about 20 miles (32 km) east of Edinburgh. The name Haddington is Anglo-Saxon, dating from the 6th or 7th century AD when the area was incorporated into the kingdom of Bernicia. The town, like the rest of the Lothian region, was ceded by King Edgar of England and became part of Scotland in the 10th century. Haddington received burghal status, one of the earliest to do so, during the reign of David I (11241153), giving it trading rights which encouraged its growth into a market town. Today Haddington is a small town with a population of less than 9,000, although during the High Middle Ages it was the fourth biggest city in Scotland after Aberdeen, Roxburgh and Edinburgh. In the middle of the town is the Town House, built in 1748 according to a plan by William Adam. When first built, it inheld a council chamber, jail and sheriff court, to which assembly rooms were added in 1788, and a new clock in 1835. Nearby is the Corn Exchange (1854) and the County Courthouse (1833). Other nearby notable sites include the Jane Welsh Carlyle House, and Mitchell's Close."