Originally associated with an Iron Age hill fort, the small market town of Duns lies on the Merse of Berwickshire in the Scottish Borders, 15 miles (24 km) west of Berwick-upon-Tweed. The former hilltop fort was replaced by a castle built in 1320 by Robert the Bruce at the foot of the hill and protected on three sides by swampland. Duns developed as a livestock market town and was county town of Berwickshire from 1551 until 1975 and administrative centre of Berwickshire District until 1996. It was the birthplace of the philosopher John Duns Scotus (c.1265-1308) who argued that religion depended on faith not reason. A bust of him stands in the public park while a cairn is at his reputed birthplace of Pavilion Lodge, Duns Castle. Also born in Duns and the surrounding area were the theologian Thomas Burton (1676 - 1732), the astronomer Abraham Robertson (1751 - 1826) and the world champion racing driver Jim Clark (d.1968), whose Memorial Room includes his trophies.
Duns Castle also includes part of a 14th-century tower constructed by Randolph Earl of Moray and rebuilt in 1820; the grounds now form a park with a bird sanctuary. On Duns Law stands the Covenanters' Stone commemorating the encampment of General Sir Alexander Leslie and the Covenanting army in 1639 as they prepared to oppose Charles I in Berwick.