Speakers of Northumbrian Old English settled in south eastern Scotland in the 7th century, at which time Cumbric was spoken in the south of Scotland up to the Forth-Clyde isthmus, and the possibly related Pictish was spoken further north. At the same time Gaelic speakers began to spread from the Western Coast of Scotland north of the Clyde into the east. Over the next five hundred years with the founding of Scotland and spread of Christianity across the north of Britain by the Columban Church the Gaelic language slowly moved eastwards and southwards across the lowlands. When Northumbrian lands were incorporated into Scotland in the 11th century Gaelic became the prestige language there and had some influence, but the south east remained largely English speaking. In the far north, Viking incursions brought Old Norse speakers into Caithness, Orkney and Shetland.
The nature of early forms of the language are obscure due to Viking plundering and destruction, Edward I of England's removal of the national records and their subsequent loss, the destruction of the monasteries in border warfare, and vandalism during the Reformation. It is difficult to assess whether Scots descends largely from the Old English of Lothian or the Anglo-Danish of Yorkshire introduced some four hundred years later, which would explain the Norse elements in Early Scots which are lacking in Northumbrian Old English. According to linguist Paul Johnston, Scots descends "from a radically restructured, Norse-influence Northumbrian going back to the Danelaw proper as much as from the original dialects of the Bernician settlers." Further Scandinavian influence could have come about through Scotland's trade contacts with Norway. Current insights into pre-literary Scots stem largely from place-names, archaeology and a few words in Latin documents.
Northumbrian Old English had been established in south-eastern Scotland as far as the River Forth by the 7th century. It remained largely confined to this area until the 13th century, continuing in common use while Scottish Gaelic was the court language until displaced by Norman French in the early 12th century. English then spread further into Scotland via the burgh.
After the 12th century early northern Middle English began to spread north and eastwards. It was from this dialect that Early Scots, known to its speakers as "English" (Inglis), began to develop, which is why in the late 12th century Adam of Dryburgh described his locality as "in the land of the English in the Kingdom of the Scots" and why the early 13th century author of de Situ Albanie thought that the Firth of Forth "divides the kingdoms of the Scots and of the English".
Most of the evidence suggests that English spread further into Scotland via the burghs, proto-urban institutions which were first established by King David I. Incoming burghers were mainly English (especially from Northumbria and the Earldom of Huntingdon), Flemish and French. Although the military aristocracy employed French and Gaelic, these small urban communities appear to have been using English as something more than a lingua franca by the end of the 13th century. As a consequence of the outcome of the Wars of Independence though, the English-speaking people of Lothian who lived under the King of Scots had to accept Scottish identity. The growth in prestige of English in the 14th century, and the complementary decline of French in Scotland's Royal Court, made English the prestige language of most of eastern Scotland.
Divergence from Northumbrian Middle English was influenced by the Norse of Scandinavian-influenced Middle English-speaking immigrants from the North and Midlands of England during the 12th and 13th centuries, Dutch and Middle Low German through trade and immigration from the low countries, and Romance via ecclesiastical and legal Latin, Norman and later Parisian French due to the Auld Alliance. Some loan words entered the language resulting from contact with Scottish Gaelic, often for geographical features such as ben, glen, crag, loch and strath; however, there are several others like bog from bog (moist or damp), twig (catch on) from tuig (understand), galore (lots of) from gu leòr (plenty), boose or buss from bus (mouth), and whisky from uisge-beatha (water of life).
Eventually the royal court and barons all spoke Inglis. Further spreading of the language eventually led to Scottish Gaelic being confined mostly to the highlands and islands by the end of the Middle Ages, although some lowland areas, notably in Galloway and Carrick, retained the language until the 17th or 18th century. From the late 14th century even Latin was replaced by Inglis as the language of officialdom and literature.
By the early 16th century what was then called Inglis had become the language of government, and its speakers started to refer to it as Scottis and to Scottish Gaelic, which had previously been titled Scottis, as Erse (Irish). The first known instance of this was by Adam Loutfut c. 1494. In 1559 William Nudrye was granted a monopoly by the court to produce school textbooks, two of which were Ane Schort Introduction: Elementary Digestit into Sevin Breve Tables for the Commodius Expeditioun of Thame That are Desirous to Read and Write the Scottis Toung and Ane Intructioun for Bairnis to be Learnit in Scottis and Latin. In 1560 an English herald spoke to Mary of Guise and her councillors, at first they talked in the "Scottish tongue" but because he could not understand they continued in French.
By this time Scots had diverged significantly from its sister south of the border and had become the vehicle for an extensive and diverse national literature. Free variation was a prominent and important feature of the Middle Scots spelling system, however, all writers displayed some greater or lesser degree of consistency in their spelling habits. A literary standard applied but it was less than uniform. From the middle of the 16th century Scots began to become increasingly Anglicized. At the time of King James I, the King James version of the Bible and other editions of the Scripture printed in English became popular. By the late 16th century almost all writing was composed in a mixture of Scots and English spellings, the English forms slowly becoming more common so that by the end of the 17th century Scots spellings had almost disappeared completely. This process took slightly longer in unpublished vernacular literature and official records. After the Union of the Crowns in 1603 the Scots speaking gentry had increasing contact with English speakers and began to remodel their speech on that of their English peers. It was this remodelling that eventually led to the formation of Scottish English.
From 1610 to the 1690s during the Plantation of Ulster some 200,000 Scots settled in the north of Ireland taking what were to become Ulster Scots dialects with them. Most of these Scots came from counties in the west of Scotland, such as Ayrshire, Lanarkshire, Renfrewshire, and Galloway, but others came from the Borders. The Ulster-Scots language has been greatly influenced in pronunciation by Hiberno-English. Additionally, it has loan-words from Irish.
In the 18th century 'polite society' now considered Scots as 'provincial and unrefined' and much of the gentry endeavoured to rid itself of the former national tongue. Elocutionists such as Thomas Sheridan and John Walker were employed to teach Scots, both in London and Scotland, the formalities of proper English. However, this status was not universally accepted by all educated Scots of the period and a new literary Scots came into being. Unlike Middle Scots, it was usually based on contemporary colloquial speech. Its orthography was generally an adaptation of the imported standard, though some orthographic features from Middle Scots continued to be used. This modern literary Scots was exemplified by Allan Ramsay and his followers, and their successors such as Robert Burns. Many writers and publishers found it advantageous to use English forms and copious apostrophes to secure a larger English readership unfamiliar with Scots. The pronunciation undoubtedly remained Scots as the rhymes reveal. Early in the 19th century the publication of John Jamieson's Etymological Dictionary of the Scots Language was accompanied by a renewed interest in Scots among the middle and upper classes. In this period the absence of an official standard or socially acceptable norm led to further dialect divergence.