Dunbar is a town on the North Sea coast in East Lothian in the south-east of Scotland, approximately 30 miles east of Edinburgh and 30 mi from the English border north of Berwick-upon-Tweed. Dunbar is a former royal burgh, and gave its name to an ecclesiastical and civil parish. The parish extends around 7+3⁄4 miles east to west and is 3+1⁄2 miles deep at its greatest extent, or 11+1⁄4 sq mi, and contains the villages of West Barns, Belhaven, and East Barns and several hamlets and farms.