|o Total||267 sq mi (692 km2)|
|Ranked 27th of 34|
Selkirkshire or the County of Selkirk (Scottish Gaelic: Siorrachd Shalcraig) is a historic county and registration county of Scotland. It borders Peeblesshire to the west, Midlothian to the north, Roxburghshire to the east, and Dumfriesshire to the south. It derives its name from its county town, the Royal burgh of Selkirk.
In the 1st Century AD Selkirk formed part of the lands of the native people who hunted it rather than settled there. Neither the Romans, Angles, or the Saxons cleared much of the forestry there and for centuries Selkirk was known for its forest coverage. Indeed, an alternative name for the county was Ettrick Forest. Under the Scottish kings the forest was regarded as Royal. Despite this it was not until the reign of James V that sheriffs were appointed to administer the county on the Crown's behalf. During the military occupation of Scotland by Edward I of England, the forest was granted to the Earl of Gloucester.
The first recorded sheriff is Andrew de Synton, appointed by William the Lion (d. 1214). Synton in the parish of Ashkirk, just east of the village centre, was an enclave of Selkirkshire surrounded by Roxburghshire. Later, the Earl of Pembroke assumed the hereditary sheriffdom. Under and after King Robert the Bruce, the Earls of Douglas, and later Earls of Angus administered the county. In 1501 John Murray (d. 1510), laird of Falahill, was made sheriff of Selkirkshire and on 30 Nov. 1509 he obtained a grant of the hereditary sheriffdom of Selkirkshire. His descendant Sir James Murray was deprived of office in 1681 for being remiss in punishing conventicles, but at the Glorious Revolution was raised to the session bench as Lord Philiphaugh and reinstated as sheriff. His son John Murray (died 1753) was the hereditary Sheriff of Selkirk from 1708 to 1734, when he was returned unopposed as MP for Selkirkshire, having resigned his hereditary sheriffdom to one of his sons. When in 1747 the heritable jurisdictions were abolished, Murray of Philiphaugh received £4,000 in compensation. The Sheriff-Deputes, previously appointed by the hereditary sheriffs, were now appointed by the crown and acted in place of the hereditary sheriffs  One such sheriff of Selkirkshire was Sir Walter Scott who was appointed Sheriff-Depute in 1799, an office he held until his death in 1832.
Between 1890 and 1975, it was one of the thirty-three administrative counties of Scotland, with a county council formed by the Local Government (Scotland) Act 1889. Selkirk County Council was based at the Bank of Scotland Buildings in the Market Place in Selkirk.
Under the Local Government (Scotland) Act 1973 the use of counties as local government areas was abolished across Scotland, with administration being transferred to the Ettrick and Lauderdale district of the Borders Region.
Selkirkshire is a rural county, with a handful of small settlements set within hill and forest country. It forms part of the Southern Uplands geographical region. The Ettrick Water and Yarrow Water, both tributaries of the river Tweed, flow through the county. The most prominent loch is St Mary's Loch (including the Loch of the Lowes), with smaller lochs being found east of this such as Akermoor Loch, Shaws Under Loch, Shaws Upper Loch, Halemoor Loch, Alemoor Reservoir, Clearburn Loch, Kingside Loch, Crooked Loch and Windylaw Loch. The traditional highest point (county top) of Selkirkshire prior to border changes in the 20th century was Dun Rig, with a height of 744 metres (2,441 ft) above sea level.
Ettrick Forest, also known as Selkirk and Traquair Forests, is a former royal forest in the Scottish Borders area of Scotland. It is a large area of moorland, south of Peebles, that once stretched from Ayr to Selkirk.
The Borders Railway connects Galashiels and Tweedbank with Edinburgh. Closed for many years, this line re-opened in 2015. There are also buses to Berwick-Upon-Tweed and Carlisle operated by Borders Buses.
Selkirkshire was historically divided into civil parishes. There were originally nine parishes; Ashkirk, Bowside, Buccleuch (or Rankilburn), Duchoire, Ettrick, Kirkhope, Lindean, St Mary's (or St Mary of the Lowes) and Selkirk. There have been a number of changes since the medieval period:
The population of the towns in the county (in 2011):
The archeology and historic buildings of the county were documented in 1957 by the Royal Commission on the Ancient and Historical Monuments in Scotland. There is also a History of Selkirkshire by T. Craig Brown, published in 1886.