defined the largely pastoral economy, with the first burghs being created from the twelfth century. The population may have grown to a peak of a million before the arrival of the Black Death in 1350. In the early Middle Ages society was divided between a small aristocracy and larger numbers of freemen and slaves. Serfdom disappeared in the fourteenth century and there was a growth of new social groups. The Pictish and Cumbric languages were replaced by Gaelic, Scots and later Norse, with Gaelic emerging as the major cultural language. From the eleventh century French was adopted in the court and in the late Middle Ages, Scots, derived from Old English, became dominant, with Gaelic largely confined to the Highlands. Christianity brought Latin, written culture and monasteries as centres of learning. From the twelfth century, educational opportunities widened and a growth of lay education cumulated in the Education Act 1496. Until in the fifteenth century, when Scotland gained three universities, Scots pursuing higher education had to travel to England or the continent, where some gained an international reputation. Literature survives in all the major languages present in the early Middle Ages, with Scots emerging as a major literary language from John Barbour's Brus (1375), developing a culture of poetry by court makars, and later major works of prose. Art from the early Middle Ages survives in carving, in metalwork, and elaborate illuminated books, which contributed to the development of the wider insular style. Much of the finest later work has not survived, but there are a few key examples, particularly of work commissioned in the Netherlands. Scotland had a musical tradition, with secular music composed and performed by bards and from the thirteenth century, church music increasingly influenced by continental and English forms. Political history Early Middle Ages Minor kingdoms In the centuries after the departure of the Romans from Britain, four major circles of influence emerged within the borders of what is now Scotland. In the east were the Picts, whose kingdoms eventually stretched from the river Forth to Shetland. The first identifiable king to have exerted a superior and wide-ranging authority, was Bridei mac Maelchon (r. c. 550–84), whose power was based in the Kingdom of Fidach and his base was at the fort of Craig Phadrig near modern Inverness. After his death leadership seems to have shifted to the Fortriu, whose lands were centred on Strathearn and