Edinburgh is the capital city of Scotland and one of its 32 council areas. The city is located in southeast Scotland and is bounded to the north by the Firth of Forth and to the south by the Pentland Hills. Edinburgh had a population of 506,520 in 2020, making it the second-most populous city in Scotland and the seventh-most populous in the United Kingdom. The wider metropolitan area had a population of 912,490 in the same year. Recognised as the capital of Scotland since at least the 15th century, Edinburgh is the seat of the Scottish Government, the Scottish Parliament, the highest courts in Scotland, and the Palace of Holyroodhouse, the official residence of the monarch in Scotland.
Scotland operates within the constitution of the United Kingdom, of which Scotland is a country. Scotland is a democracy, being represented in both the Scottish Parliament and the Parliament of the United Kingdom since the Scotland Act 1998. Most executive power is exercised by the Scottish Government, led by the first minister of Scotland, the head of government in a multi-party system. The judiciary of Scotland, dealing with Scots law, is independent of the legislature and the Scottish Government, and is headed by the Lord Advocate who is the principal legal adviser to the Scottish Government. Scots law is primarily determined by the Scottish Parliament. The Scottish Government shares limited executive powers, notably over reserved matters, with the Scotland Office, a British government department led by the Secretary of State for Scotland.
The Kingdom of Scotland entered a fiscal and political union with the Kingdom of England with the Acts of Union 1707, by which the Parliament of Scotland was abolished along with its English counterpart to form the Parliament of Great Britain, and from that time Scotland has been represented by members of the House of Commons in the Palace of Westminster. The Scottish Parliament was re–convened in 1999, as a result of the Scotland Act 1998 and the preceding 1997 Scottish devolution referendum, held under the Referendums (Scotland and Wales) Act 1997.
The issues of Scottish nationalism and Scottish independence are prominent political issues in the early 21st century. When the Scottish National Party formed a majority government after the 2011 Scottish Parliament election and passed the Scottish Independence Referendum Act 2013, the British parliament concluded the Edinburgh Agreement with the Scottish Government, enabling the 2014 Scottish independence referendum. The referendum was held on 18 September 2014, with 55.3% voting to stay in the United Kingdom and 44.7% voting for independence.