A former county and an earldom of S Scotland, Dumfriesshire extended to 1063 sq. miles (2753 sq. km), bounded to the N by the counties of Lanarkshire, Peeblesshire and Selkirkshire, to the E by Roxburghshire, to the W by Ayrshire and Kirkcudbrightshire, and to the S by the Solway Firth and the English Border. The county town was Dumfries, and other notable settlements included Annan, Langholm, Lockerbie, Moffat, Moniaive, Sanquhar and Thornhill. Its principal rivers were the Nith, Annan and Esk, all flowing south through significant valleys which served as gateway routes into Scotland. In 1974 the county was incorporated into Dumfries and Galloway Region, where it remains following a further local government re-organisation in 1996.