The Reformation in Scotland was swifter and more clean-cut than south of the border. Education was at the heart of Protestant salvation, and the reformers, including John Knox, produced in the First Book of Discipline a national scheme for parish schools.
Literacy was important because every man and woman was responsible for their future salvation through faith rather than works.
The priest was no longer the intermediary and so every parish ideally had to have a schoolmaster who in making the scriptures accessible would encourage "the virtuous education and godly upbringing of the youth of this realm".
The reformers' ambition went further. Parish schools and burgh grammar schools would link to the three (by the end of the 16th century, four) universities which produced men fit for the vocations - the church, the law and medicine.
The state was called on to aid this godly, yet practical, plan. Throughout the Stuart period and long after, local landowners were taxed to provide for the parish school.
By the 1707 Act of Union almost all parishes in Lothian had schools. Even in the Gaelic-speaking Highlands most areas had schools in the 18th century, and the ability to read was widespread, though the extent of skill in writing is more debatable.
When England had only Oxford and Cambridge, Scotland, economically the poor relation, had four universities. Their purpose was not to give a polish to gentlemen's education.
The Scottish Enlightenment needed practical men who would enact new agricultural practices or make a career at, say, the Tsar's court or the East India Company.
Nevertheless, it was an arbitrary patchwork of schools that gave Scotland its early reputation for near-universal literacy.
Standards of attainment were varied and under-resourcing, not least in terms of accommodation and schoolmasters' salaries, had become a pressing issue by the early 19th century. So did the lack of education for children in the rapidly expanding industrial towns of central Scotland.
Ironically for a country in the vanguard of popular education, mandatory universal provision came only in 1872, two years after erstwhile laggardly England.
Willis Pickard is the editor of The TES Scotland