Scotland in the Middle Ages concerns the history of Scotland from the departure of the Romans to the adoption of major aspects of the Renaissance in the early sixteenth century.
From the fifth century northern Britain was divided into a series of petty kingdoms. Of these the four most important to emerge were the Picts, the Gaels of Dál Riata, the Britons of Strathclyde and the Anglo-Saxon kingdom of Bernicia, later taken over by Northumbria. After the arrival of the Vikings in the late eighth century, Scandinavian rulers and colonies were established along parts of the coasts and in the islands.
In the ninth century the Scots and Picts combined under the House of Alpin to form a single Kingdom of Alba, with a Pictish base and dominated by Gaelic culture. After the reign of King David I in the twelfth century, the Scottish monarchs are best described as Scoto-Norman, preferring French culture to native Scottish culture. Alexander II and his son Alexander III, were able to regain the remainder of the western seaboard, cumulating the Treaty of Perth with Norway in 1266.
After being invaded and briefly occupied, Scotland re-established its independence from England under figures including William Wallace in the late thirteenth century and Robert Bruce in the fourteenth century.