Inverness is an ancient cathedral city in the Scottish Highlands. It is the administrative centre for The Highland Council and is regarded as the capital of the Highlands. Historically it served as the county town of the county of Inverness-shire. Inverness lies near two important battle sites: the 11th-century battle of Blàr nam Fèinne against Norway which took place on the Aird, and the 18th century Battle of Culloden which took place on Culloden Moor. It is the northernmost city in the United Kingdom and lies within the Great Glen (Gleann Mòr) at its northeastern extremity where the River Ness enters the Moray Firth. At the latest, a settlement was established by the 6th century with the first royal charter being granted by Dabíd mac Maíl Choluim (King David I) in the 12th century. The Gaelic king Mac Bethad Mac Findláich (MacBeth) whose 11th-century killing of King Duncan was immortalised in Shakespeare's largely fictionalized play Macbeth, held a castle within the city where he ruled as Mormaer of Moray and Ross.