A resort town on the North Sea coast of East Lothian, Dunbar lies 10 miles east of Haddington, nearly halfway between Edinburgh and Berwick-upon-Tweed. Now bypassed by the A1 trunk road, it owes its origins to a natural harbour that is overlooked by Dunbar Castle which stands on a defensible rock. The castle, once a Northumbrian stronghold, was given to the 1st Earl of Dunbar in 1070 by Malcolm Canmore. Two centuries later a convent and priory were established by Patrick, 5th Earl of Dunbar. Burgh status soon followed and the 9th Earl founded Scotland's first collegiate church here in 1342. In 1445 Dunbar became a royal burgh and ten years later its castle was forfeited to the Crown. Frequently destroyed then re-fortified, the castle was visited by Mary Queen of Scots in 1566 after the murder of Rizzio and a year later was finally demolished by Regent Moray. A fishing and trading port for several centuries, Dunbar's harbour was rebuilt in 1650 with a grant of £300 form Oliver Cromwell whose troops had taken the town following a battle just to the southeast. During the 18th century Dunbar grew in association with whaling, distilling, brewing, the export of coal and the manufacture of textiles. In the late 19th century it developed as a holiday resort with golf courses and Dunbar once had the largest outdoor pool in Scotland. Buildings of note include the parish church (1812-21), the mid-17th-century tolbooth and Lauderdale House (1790-92) which was designed by Robert and James Adam. Dunbar was the birthplace of the conservationist John Muir (1838 - 1914) whose achievements are remembered at his birthplace, the John Muir Centre, and in the naming of a coastal country park designated nearby in 1982.