List of Scottish monarchs
The Kingdom of the Picts just became known as Kingdom of Alba in Gaelic, which later became known in Scots and English as "Scotland"; the terms are retained in both languages to this day. By the late 11th century at the very latest, Scottish kings were using the term "rex Scottorum", or King of Scots, to refer to themselves in Latin. The Kingdom of Scotland was merged with the Kingdom of England to form a single Kingdom of Great Britain in 1707. Thus Queen Anne became the last monarch of the ancient kingdoms of Scotland and England and the first of Great Britain, although the kingdoms had shared a monarch since 1603 (see Union of the Crowns). Her uncle Charles II was the last monarch to be crowned in Scotland, at Scone in 1651. He had a second coronation in England ten years later.
Scotland
In the twelfth and thirteenth centuries, with much of Scotland under the control of a single ruler and united by the Gaelic language, a modern nation-state first emerged, as did Scottish national consciousness. The domination of Gaelic was cracked during the reign of David I (1124–53), during which many English-speaking colonists settled in Scotland. David I and his successors also centralized royal power and united mainland Scotland, capturing regions such as Moray, Galloway, and Caithness, although he did not succeed at extending his power over the Hebrides, which had been ruled by various Scottish clans following the death of Somerled in 1164. The system of feudalism was consolidated, with both Anglo-Norman incomers and native Gaelic chieftains being granted land in exchange for serving the king. The Scottish kings rejected English demands to subjugate themselves; in fact, England invaded Scotland several times to prevent the latter's expansion into northern England. 
The death of Alexander III in March 1286 broke the succession line of Scotland's kings. Edward I of England arbitrated between various claimants for the Scottish crown. In return for surrendering Scotland's nominal independence, John Balliol was pronounced king in 1292. In 1294, Balliol and other Scottish lords refused Edward's demands to serve in his army against the French. Scotland and France sealed a treaty on 23 October 1295, known as the Auld Alliance. War ensued and John was deposed by Edward who took personal control of Scotland. Andrew Moray and William Wallace initially emerged as the principal leaders of the resistance to English rule in the Wars of Scottish Independence, until Robert the Bruce was crowned king of Scotland in 1306. Victory at the Battle of Bannockburn in 1314 proved the Scots had regained control of their kingdom. In 1320 the world's first documented declaration of independence, the Declaration of Arbroath, won the support of Pope John XXII, leading to the legal recognition of Scottish sovereignty by the English Crown.
A civil war between the Bruce dynasty and their long-term Comyn-Balliol rivals lasted until the middle of the 14th century. Although the Bruce faction was successful, David II's lack of an heir allowed his half-nephew Robert II to come to the throne and establish the House of Stewart. The Stewarts ruled Scotland for the remainder of the Middle Ages. The country they ruled experienced greater prosperity from the end of the 14th century through the Scottish Renaissance to the Reformation, despite the effects of the Black Death in 1349 and increasing division between Highlands and Lowlands. Multiple truces reduced warfare on the southern border.