Drumlanrig Castle is a large country house in the south-west of Scotland, near to Thornhill, in Dumfries and Galloway. It is owned by the Duke of Buccleuch. Despite its name it is actually a baroque country house, and had no military function, although two earlier defensive castles had stood on the site. It was built between 1684 and 1691 for the 1st Duke of Queensberry.