The name Dunbar is derived from the Gaelic word Dùn Barra, meaning "summit fort". The town dates back to at least the Iron Age with evidence of a an old defensive fort. It is thought that St Cuthbert was born in Dunbar in 634 and worked as a shepherd before becoming a monk in Melrose. Dunbar was originally part of Northumbria but after the battle of Carham in 1018 when Lothian was ceded Malcolm II the town was finally acknowledged as part of Scotland.
In 1072 Dunbar was included in a land grant by Malcolm III to his cousin the exiled Earl Gospatric of Northumbria. The grant included Dunbar and an extensive area of East Lothian and Berwickshire. The Gospatric family founded the family of Dunbar, the head of the house filling the position of Earls of Dunbar and March. Gospatric built the first stone castle in Dunbar and the town steadily grew becoming a royal burgh in 1370.
Both the Castle and Town were fought over by both England and Scotland and although the castle withstood many sieges the town was frequently burnt. Although the castle was deliberately destroyed in 1568 the town continued to flourish and both a fishing port and agricultural centre. In 1650 the Scottish army were heavily defeated by Olive Cromwell and his parliamentary army in the "Battle of Dunbar". In the nineteenth century the town became a popular holiday and golfing resort, becoming famous for its "bracing air".
Although a stronghold existed from at least the ninth century the ruins of Dunbar Castle date from the twelfth century The red stone castle was built by the Earl of Gospatric and was one of the strongest fortresses in Scotland. It was built overlooking the town and the sea and although it suffered may sieges the castle never succumbed remaining until it was deliberately destroyed in 1568.
The John Muir Country Park is an area of woodland, grassland and stunning , rugged coastline stretching from Dunbar to Tyninghame. The John Muir Way runs through the park on its way to North Berwick and the ruins of Dunbar Castle lie just within the park.