Lanark lies high on the east bank of the River Clyde, close to its confluence with the Mouse Water. Its strategic location guarding the Clyde Valley was first recognised by the Romans, who built a fortification on what is now known as Castle Hill, an outcrop south-west of the centre of the town which drops steeply into the valley.
The Romans were followed by others in fortifying this site, and in 978 King Kenneth II held at least one Parliament here. Lanark Castle was later a residence of David I and William the Lion: and in 1140 David granted Lanark the status of a Royal Burgh.
The next chapter in Lanark's history is remembered by a plaque on a stone plinth set in an unpromising gap between two buildings facing across to St Nicholas' Church. It states: "Here stood the house of William Wallace who in Lanark in 1297 first drew sword to free his native land."
By July 1297 Wallace was already an outlaw. He was visiting his wife, Marion Braidfoot, and his baby daughter in Lanark when the English Sheriff, Sir William Heselrig, learned of his presence in the town. The English troops arrived from Lanark Castle to arrest him, but Wallace escaped after a fight. Marion Braidfoot did not, and Sir William Heselrig had her killed when she refused to say where Wallace was hiding.
That same night Wallace and his men attacked and took Lanark Castle. Wallace killed Heselrig in his bed, then ordered the slaughter the entire English garrison. This was the spark that lit the revolt that culminated in the Battle of Stirling Bridge on 11 September 1297. Heselrig's death was later one of the charges laid against Wallace at his brief trial in London in 1305.
Lanark Castle never developed beyond Heselrig's timber structure and in the late 1700s the site was turned into a bowling green. Which is how it remains today, the only evidence of its earlier life being a stone memorial and the very steep drops that fall away on three sides of the bowling green into the Clyde Valley.
In more recent centuries Lanark has served as a focus for a wide rural community, and its livestock markets were particularly important. Perhaps the biggest change came from 1785 when the immense power of the water tumbling down the River Clyde in the valley below began to be harnessed by the vast cotton mills built at New Lanark, just a mile from the existing town.
For the better part of 200 years the bustling community of New Lanark helped drive the local economy. But the mills closed in 1968 and by 1974 it was thought possible that the whole New Lanark development would have to be demolished. Instead it began a process of regeneration that led to its being granted World Heritage Site Status by UNESCO on 14 December 2001.