Thanks to J. Evans for providing the list of rulers.Gaels migrated from Ireland to western Scotland (which was called Caledonia at the time by the Romans) in the 5th century, after the Romans had retreated from Britain, and there established the kingdom of Dalriada in Argyllshire. The lists presented here begin with the kings of Dalriada.
The north of Scotland was controlled by the Picts, an ancient Celtic people. Conflict and intermixing between the Scots and the Picts continued until the two realms were finally merged under the Dalriadan king Kenneth mac Alpin around the year 850. The exact reasons for Kenneth's rise to power over the Picts are not clear, but it is apparent that many of the lords of both the Picts and the Scots had been killed in wars with invading Vikings. The kingdom was known as Alba, and by 1034 it had incorporated the Briton kingdom of Strathclyde in the south.
Struggles with the English and periods of domination followed over the next few centuries, but Scottish independence was ultimately asserted by Robert the Bruce, who became king of Scotland in 1306. Shortly afterwards, starting with Robert II, the Stuart royal family began its long rule in Scotland. Their reign was marked by periods of internal unrest and conflict with England. However in 1603 the Stuart king James VI, son of Mary Queen of Scots, succeeded to the English throne, and the Scottish Crown was formally merged with that of England by the Act of Union in 1707.