The shires of Scotland, or counties of Scotland, are historic subdivisions of Scotland established in the Middle Ages and used as administrative divisions until 1975. Originally established for judicial purposes, from the 17th century they started to be used for local administration purposes as well. The areas used for judicial functions (sheriffdoms) came to diverge from the shires, which ceased to be used for local government purposes after 1975 under the Local Government (Scotland) Act 1973.