History of local government in Scotland
The History of local government in Scotland is a complex tale of largely ancient and long established Scottish political units being replaced after the mid 20th century by a frequently changing series of different local government arrangements. Origins. Anciently, the territory now referred to as "Scotland" belonged to a mixture of Brythionic groups (Picts and Cumbrians) and Angles. The Picts were based north of the Forth-Clyde line, traditionally in 7 kingdoms : In later legends, the legendary founder of Scotland had seven sons, who each founded a kingdom. De Situ Albanie enumerates the kingdoms  in two lists, the first of which locates the seventh kingdom between the Forth and the Earn, while the second additionally replaces Cat with the area that became Dalriada. The Cumbrians were based in the south west, in two principal kingdoms: The Angles were based in the south east, in the Kingdom of Northumbria, which was divided into a number of sub-kingdoms, some of which were located in territory now considered part of "Scotland": When the Irish group "Scotii" invaded, they established the Kingdom of Dál Riata in the area between Glen Coe and Loch Long, which they organised  into four geographic kin-groups : Alba. For reasons which are extremely opaque to historical enquiry, most of the Pictish lands became a Scotii kingdom based at Scone - the Kingdom of Alba. The status of Fortriu and Dalriada are extremely unclear; it seems that theoretically they were meant to owe some form of vassalage to the King of Alba, but in practice were somewhat independent. The other Pictish kingdoms were divided up, with the King of Alba retaining the more useful coastal parts, while handing the remainder of each former kingdom to a powerful governor. The king controlled his lands through  a number of stewards ("maer" in Gaelic), hence the powerful governors were "great stewards" ("mormaer" in Gaelic). Northumbrian pressure caused Rheged to collapse, establishing Galloway as an independent state. Strathclyde took the opportunity created by Rheged's collapse to expand towards the south east, into what is now northern Cumbria. Records are unclear, but it seems that Scotii raids lead to Galloway submitting to the authority of Alba, and the transfer of Carrick from Strathclyde to Galloway. Danish invasions caused the power of Northumbria to collapse, and ultimately its lands to become parts of a unified England. Meanwhile, Norse invasions  of the islands to the north and west of the mainland conquered Cat, and established: Norse invaders also besieged Dumbarton Rock, the capital of Strathclyde, eventually causing its defeat. As a result, Dunbarton Rock was abandoned, and Strathclyde moved its capital upriver, to Partick. Alba took the opportunity to seize the now-undefended area around Loch Lomond. Similarly, the weakening of Northumbria enabled Alba to push south and take over the area around Stirling. By the 10th century, the governance of the area now known as "Scotland" thus broke down as follows: Middle ages. Provinces. In the later medieval period , government combined traditional kinship-based lordships with a relatively small system of royal offices. Until the 15th century the ancient pattern of major lordships survived largely intact, with the addition of two new "scattered earldoms" of Douglas and Crawford, thanks to royal patronage after the Wars of Independence, mainly in the borders and south-west. The dominant kindred were the Stewarts, who came to control many of the earldoms. Their acquisition of the crown, and a series of internal conflicts and confiscations, meant that by around the 1460s the monarchy had transformed its position within the realm, gaining control of  most of the "provincial" earldoms and lordships. Rather than running semi-independent lordships, the major magnates now had scattered estates and occasional regions of major influence. In the lowlands the crown was now able to administer government through the system of sheriffdoms and other appointed officers, rather than semi-independent lordships. In the highlands James II created two new provincial earldoms for his favourites: Argyll for the Campbells and Huntly for the Gordons, which acted as a bulwark against the vast Lordship of the Isles built up by the Macdonalds. James IV largely resolved the Macdonald problem by annexing the  estates and titles of John Macdonald II to the crown in 1493 after discovering his plans for an alliance with the English. The shires of Scotland have their origins in the sheriffdoms or shires over which a sheriff (a contraction of "shire reeve") exercised jurisdiction. The term "shire" is somewhat misleading, as it should not be confused with an English county. In medieval Latin, the latter was referred to as a "comitatus", which is Scotland was the region controlled as a province or lordship (as opposed, for example, to a Lairdship), such as a mormaerdom, or an early Earldom, and  typically survived as a regality (though this is a broader term encompassing also more junior authority). "Shire" instead came into use, in Scotland, to refer to the region in which a particular sheriff operated; in Scottish medieval Latin this was sometimes called the "vice-comitatus". Malcolm III appears to have introduced sheriffs as part of a policy of replacing native "Celtic" forms of government with Anglo Saxon and Norman feudal structures. This was continued by his sons Edgar, Alexander I and in particular David I. David completed the division of the country into sheriffdoms by the conversion of existing thanedoms . Many of the shires were directly analogous to existing provinces (e.g. the province of Teviotdale and the shire of Roxburgh), whilst other formed from combinations of provinces (e.g. the shire of Ayr consisting of Cunninghame, Carrick and Kyle). Founding of the Burghs. The first burghs existed from the 12th century, when King David I created the first royal burghs. By 1130, David I (r. 1124–53) had established other burghs including Edinburgh, Stirling, Dunfermline, Perth, Dumfries, Jedburgh, Montrose and Lanark. Most of the burghs granted charters in his reign probably already existed as settlements. Charters were copied almost verbatim from those  used in England, and early burgesses were usually invited English and Flemish settlers. They were able to impose tolls and fines on traders within a region outside their settlements. Most of the early burghs were on the east coast, and among them were the largest and wealthiest, including Aberdeen, Berwick, Perth and Edinburgh, whose growth was facilitated by trade with other North Sea ports on the continent, in particular in the Low Countries, as well as ports on the Baltic Sea. In the south-west, Glasgow, Ayr and Kirkcudbright were aided by the less profitable sea trade with Ireland and  to a lesser extent France and Spain. Burghs were typically settlements under the protection of a castle and usually had a market place, with a widened high street or junction, marked by a mercat cross, beside houses for the burgesses and other inhabitants. The founding of 16 royal burghs can be traced to the reign of David I (1124–53) and there is evidence of 55 burghs by 1296. In addition to the major royal burghs, the late Middle Ages saw the proliferation of baronial and ecclesiastical burghs, with 51 created between 1450 and 1516. Most of these were much smaller  than their royal counterparts. Excluded from foreign trade, they acted mainly as local markets and centres of craftsmanship. Burghs were centres of basic crafts, including the manufacture of shoes, clothes, dishes, pots, joinery, bread and ale, which would normally be sold to "indwellers" and "outdwellers" on market days. In general, burghs carried out far more local trading with their hinterlands, on which they relied for food and raw materials, than trading nationally or abroad. Early Modern Scotland. From the sixteenth century, the central government became increasingly involved in local affairs. The feud was limited and regulated, local taxation became much  more intrusive and from 1607 regular, local commissions of Justices of the Peace on the English model were established to deal with petty crimes and infractions. Greater control was exerted over the lawless Borders through a joint commission with the English set up in 1587. James VI was much more hostile to the culture and particularism of the Highlands than his predecessors. He sent colonists from Fife to parts of the region and forced the Highland chiefs to accept Lowland language and culture through the Statutes of Iona 1609. In 1685 Sir George Mackenzie, recently made Viscount of Tarbat and  later elevated to Earl of Cromartie, secured two Acts of the Parliament of Scotland transferring his lands in Easter Ross from Ross-shire to Cromartyshire, making Cromartyshire the last of the shires to be established. From the seventeenth century the function of shires expanded from judicial functions into wider local administration, and in 1667 Commissioners of Supply were appointed in each sheriffdom or shire to collect the cess land tax. From this point shires came to be regarded as the main division of the country in preference to the former provinces. The parish also became an important unit of local  government, pressured by Justices in the early eighteenth century, it became responsible for taking care of the destitute in periods of famine, like that in 1740, in order to prevent the impoverished from taking to the roads and causing general disorder. Behaviour could be regulated through kirk sessions, composed of local church elders, which replaced the church courts of the Middle Ages, and which dealt with moral and religious conduct. The local court baron remained important in regulating minor interpersonal and property offences. They were held at the behest of the local baron when there was a backlog of cases  and could appoint birleymen, usually senior tenants, who would resolve disputes and issues. The combination of kirk sessions and courts baron gave considerable power to local lairds to control the behaviour of the populations of their communities. From the eighteenth century the shires (used for administration) began to diverge from the sheriffdoms (used for judicial functions) (see Historical development of Scottish sheriffdoms). Modern era. As a result of the dual system of local government, burghs (of which there were various types) often had a high degree of autonomy. In 1858 police forces were established in each county under the Police  (Scotland) Act 1857. In 1890 with the Local Government (Scotland) Act 1889 came into force. It established a uniform system of county councils in Scotland. The county councils assumed many of the powers of existing organisations such as the Commissioners of Supply and County Road Trustees and many of the administrative powers and duties of the Justices of the Peace and parochial boards. Between 1890 and 1929, there were parish councils and town councils, but with the passing of the Local Government (Scotland) Act 1929, the functions of parish councils were passed to larger district councils and a distinction was  made between large burghs (i.e. those with a population of 20,000 or more) and small burghs. The Act also created two joint county councils covering Perthshire and Kinross-shire, and Morayshire and Nairnshire, but retained residual Nairnshire and Kinross-shire county councils. This system was further refined by the passing of the Local Government (Scotland) Act 1947 which created a whole new set of administrative areas known as 'counties', 'counties of cities', 'large burghs' and 'small burghs'. These were to last until 1975. A Royal Commission on Local Government in Scotland in 1969 (the Wheatley Report) recommended that the interests  of local government would best be served by large Regional councils instead of councils based on small counties. The report was largely implemented by the Local Government (Scotland) Act 1973 – creating a system of regions and districts in 1975. The system was only to last for 21 years as with the passing of the Local Government etc. (Scotland) Act 1994 the regions and districts were re-organised into all-purpose unitary council areas.