Edinburgh (pronounced "Ed-in-burr-ah") is the capital city of Scotland, the second largest city in Scotland after Glasgow and the seventh largest, population-wise, in the United Kingdom. Located in the southeast of Scotland, Edinburgh lies on the east coast of the Central Belt, along the Firth of Forth, near the North Sea. Due to its rugged setting and vast collection of Medieval and Georgian architecture, it is often considered one of the most picturesque cities in Europe. Rising high above the rest of the city on volcanic rock is Edinburgh Castle. Human habitation of the castle site has been dated back as far as the 9th century BC, though the nature of early settlement is unclear. There has been a royal castle here since at least the reign of David I in the 12th century, and the site continued to be a royal residence until the Union of the Crowns in 1603. There is still a military presence at the castle today, but it is largely ceremonial and administrative.