Lochmaben Castle is a castle (ruins) inĀ Lochmaben Town, Dumfries & Galloway. It was built by Edward I in the 13th & 14th centuries, & was later rebuilt during the reign of James IV of Scotland. An earlier motte-and-bailey castle was built by the Bruce family south of the current castle around 1160.