Scotland in the late Middle Ages

Scotland in the late Middle Ages, between the deaths of Alexander III in 1286 and James IV in 1513, established its independence from England under figures including William Wallace in the late 13th century and Robert Bruce in the 14th century. In the 15th century under the Stewart Dynasty, despite a turbulent political history, the Crown gained greater political control at the expense of independent lords and regained most of its lost territory to approximately the modern borders of the country. However, the Auld Alliance with France led to the heavy defeat of a Scottish army at the Battle of Flodden in 1513 and the death of the king James IV, which would be followed by a long minority and a period of political instability.

The economy of Scotland developed slowly in this period and a population of perhaps a little under a million by the middle of the 14th century began to decline after the arrival of the Black Death, falling to perhaps half a million by the beginning of the 16th century. Different social systems and cultures developed in the lowland and highland regions of the country as Gaelic remained the most common language north of the Tay and Middle Scots dominated in the south, where it became the language of the ruling elite, government and a new national literature. There were significant changes in religion which saw mendicant friars and new devotions expand, particularly in the developing burghs.

By the end of the period Scotland had adopted many of the major tenets of the European Renaissance in art, architecture and literature and produced a developed educational system. This period has been seen as one in which a clear national identity emerged in Scotland, as well as significant distinctions between different regions of the country which would be particularly significant in the period of the Reformation.

John
The death of king Alexander III in 1286, and the subsequent death of his granddaughter and heir Margaret (called "the Maid of Norway") in 1290, left 14 rivals for succession. To prevent civil war the Scottish magnates asked Edward I of England to arbitrate. He extracted legal recognition that the realm of Scotland was held as a feudal dependency to the throne of England before choosing John Balliol, the man with the strongest claim, who became king as John I (30 November 1292). Robert Bruce of Annandale, the next strongest claimant, accepted this outcome with reluctance. Over the next few years Edward I used the concessions he had gained to systematically undermine both the authority of King John and the independence of Scotland. In 1295 John, on the urgings of his chief councillors, entered into an alliance with France, the beginning of the Auld Alliance.

In 1296 Edward invaded Scotland, deposing King John. The following year William Wallace and Andrew Murrey raised forces to resist the occupation and under their joint leadership an English army was defeated at the Battle of Stirling Bridge. Murrey died of wounds after the battle and for a short time Wallace ruled Scotland in the name of John Balliol as Guardian of the realm. Edward came north in person and defeated Wallace at the Battle of Falkirk. Wallace escaped but probably resigned as Guardian of Scotland. In 1305 he fell into the hands of the English, who executed him for treason although he owed no allegiance to England.

Robert I
Rivals John Comyn and Robert the Bruce, grandson of the claimant Robert Bruce of Annandale, were appointed as joint guardians in Wallace's place. On 10 February 1306, Bruce participated in the murder of Comyn, at Greyfriars Kirk in Dumfries. Less than seven weeks later, on 25 March Bruce was crowned as King Robert I at Scone. However, Edward's forces overran the country after defeating Bruce's small army at the Battle of Methven. Despite the excommunication of Bruce and his followers by Pope Clement V, his support grew; and by 1314, with the help of leading nobles such as Sir James Douglas and the Earl of Moray, only the castles at Bothwell and Stirling remained under English control. Edward I had died in 1307 and his heir Edward II moved an army north to break the siege of Stirling Castle and reassert control. They were defeated by forces under Robert I at the Battle of Bannockburn in 1314, securing de facto independence.

In 1320 the Declaration of Arbroath, a remonstrance to the Pope from the nobles of Scotland, helped to convince Pope John XXII to overturn the earlier excommunication and nullify the various acts of submission by Scottish kings to English ones so that Scotland's sovereignty could be recognised by the major European dynasties. The Declaration has also been seen as one of the most important documents in the development of a Scottish national identity. Robert's brother Edward Bruce carried out a series of campaigns against English forces in Ireland and was declared High King. The campaigns in Ireland, although ultimately unsuccessful, opened the prospect of what has been characterised as "Pan-Gaelic Greater Scotia" under the Bruce dynasty. Robert's forces carried out a series of raids of Northern England, defeating an English army in 1327 at the Battle of Stanhope Park. Robert's victories contributed to the deposition of Edward II and Robert was able to take advantage of the minority of his son Edward III to secure the Treaty of Edinburgh–Northampton, signed in May 1328, which recognised Scotland as an independent kingdom, and Bruce as its king.

David II
Robert I died in 1329, leaving his five-year-old son to reign as David II. During his minority, the country was ruled by a series of governors, two of whom died as a result of a renewed invasion by English forces from 1332. This was on the pretext of restoring Edward Balliol, son of John Balliol, to the Scottish throne, thus starting the Second War of Independence. Despite victories at Dupplin Moor (1332) and Halidon Hill (1333), in the face of tough Scottish resistance led by Sir Andrew Murray, the son of Wallace's comrade in arms, successive attempts to secure Balliol on the throne failed. Edward III lost interest in the fate of his protege after the outbreak of the Hundred Years' War with France. In 1341 David was able to return from temporary exile in France. In 1346 under the terms of the Auld Alliance, he invaded England in the interests of France, but was defeated and taken prisoner at the Battle of Neville's Cross on 17 October 1346 and would remain in England as a prisoner for 11 years. His cousin Robert Stewart ruled as guardian in his absence. Balliol finally resigned his claim to the throne to Edward in 1356, before retiring to Yorkshire, where he died in 1364.

Without swearing allegiance to Edward III, David was released for a ransom of 100,000 marks in 1357, but he was unable to pay, resulting in secret negotiations with the English and attempts to secure succession to the Scottish throne for an English king. Major issues were his marriages and the failure to produce an heir. His first wife, Joan, the sister of Edward III, left him for England sometime after his return and she died without children in 1362. His planned second marriage to Margaret, the widow of the knight Sir John Logie, resulted in a factional division that alienated nobles including Robert Steward. Eventually, the king backed the queen's opponents and attempted to divorce her. She fled to the continent and appealed to the Pope for support. Before he could marry again David died, apparently unexpectedly, bringing the Bruce dynasty to an end.

Robert II, Robert III and James I
After the unexpected death of the childless David II, Robert Stewart, the first of the Stewart (later Stuart) monarchs, came to the throne in 1371. Despite his relatively venerable age of 55, his son, John, Earl of Carrick, grew impatient and assumed the reins of government as Lord Lieutenant. A border incursion into England led to the victory at Otterburn in 1388, but at the cost of the life of John's ally James Douglas, 2nd Earl of Douglas. This, along with Carrick having suffered a debilitating horse kick, led to a shift in power to his brother Robert Stewart, Earl of Fife, who now was appointed as Lieutenant in his place. When Robert II died in 1390 John took the regnal name Robert III, to avoid awkward questions over the exact status of the first King John, but power rested with his brother Robert, now Duke of Albany. After the suspicious death of his elder son, David, Duke of Rothesay in 1402, Robert, fearful for the safety of his younger son, James (the future James I), sent him to France in 1406. However, the English captured him en route and he spent the next 18 years as a prisoner held for ransom. As a result, after the death of Robert III later that year, regents ruled Scotland: first Albany and after his death in 1420 his son Murdoch, during whose term of office the country suffered considerable unrest.

When the Scots finally began the ransom payments in 1424, James, aged 32, returned with his English bride, Joan Beaufort, determined to assert this authority. He revoked grants from customs and of lands made during his captivity, undermining the position of those who had gained in his absence, particularly the Albany Stewarts. James had Murdoch and two of his sons tried and then executed with further enforcement of his authority by more arrests and forfeiture of lands. In 1436 he attempted to regain one of the major border fortresses still in English hands at Roxburgh, but the siege ended in a humiliating defeat. He was murdered by discontented council member Robert Graham and his co-conspirators near the Blackfriars church, Perth in 1437.

James II
The assassination left the king's seven-year-old son to reign as James II. After the execution of a number of suspected conspirators, leadership fell to Archibald Douglas, 5th Earl of Douglas, as lieutenant-general of the realm. After his death in 1439, power was shared uneasily between the Douglas family, William, 1st Lord Crichton, Lord Chancellor of Scotland and Sir Alexander Livingston of Callendar. A conspiracy to break the power of the Douglas family led to the "Black Dinner" at Edinburgh Castle in 1440, which saw the judicial murder of the young William Douglas, 6th Earl of Douglas and his brother by Livingstone and Crichton. The main beneficiary was the victims' great uncle James Douglas, Earl of Avondale who became the 7th Earl of Douglas and emerged as the main power in the government.

In 1449 James II was declared to have reached his majority, but the Douglases consolidated their position and the king began a long struggle for power, leading to the murder of the 8th Earl of Douglas at Stirling Castle on 22 February 1452. This opened an intermittent civil war as James attempted to seize Douglas lands, punctuated by a series of humiliating reversals. Gradually James managed to win over the allies of the Douglases with offers of lands, titles and offices and the Douglases' forces were finally defeated at the Battle of Arkinholm on 12 May 1455. Once independent, James II proved to be an active and interventionist king. He travelled the country dispensing justice and some of the unpopular policies of the following reign, such as the sale of pardons, may have originated in this period. Ambitious plans to take Orkney, Shetland and the Isle of Man came to nothing. His attempt to take Roxburgh from the English in 1460 succeeded, but at the cost of his life as he was killed by an exploding artillery piece.

James III
James II's son, aged nine or ten, became king as James III, and his widow Mary of Guelders acted as regent until her death three years later. The Boyd family, led by Robert, Lord Boyd, emerged as the leading force in the government, making themselves unpopular through self-aggrandisement, with Lord Robert's son Thomas being made Earl of Arran and marrying the king's sister, Mary. While Robert and Thomas were out of the country in 1469 the king asserted his control, executing members of the Boyd family. His foreign policy included a rapprochement with England, with his eldest son, the future James IV, being betrothed to Cecily of York, the daughter of Edward IV of England, a change of policy that was immensely unpopular at home.

During the 1470s conflict developed between the king and his brothers, Alexander, Duke of Albany and John, Earl of Mar. Mar died suspiciously in 1480 and his estates were forfeited and possibly given to a royal favourite, Robert Cochrane. Albany fled to France in 1479, accused of treason. By this point, the alliance with England was failing and from 1480 there was intermittent war, followed by a full-scale invasion of Scotland two years later, led by the Duke of Gloucester, the future Richard III, and accompanied by Albany. James was imprisoned by his own subjects in Edinburgh Castle, and Albany was established as lieutenant-general. Having taken Berwick-upon-Tweed the English retreated and Albany's government began to collapse forcing him to flee. Despite conspiracies and more attempts at invasion, James was able to regain power. However, the king managed to alienate the barons, refusing to travel for the implementation of justice, preferring to be resident in Edinburgh, he debased the coinage, probably creating a financial crisis, he continued to pursue an English alliance and dismissed key supporters, including his Chancellor Colin Campbell, 1st Earl of Argyll, becoming estranged from his wife, Margaret of Denmark, and his son James. Matters came to a head in 1488 when he faced an army raised by the disaffected nobles, and many former councillors, acting in the name of the prince as James IV. He was defeated at the Battle of Sauchieburn and killed.

James IV
James IV was 15 when he came to the throne, but soon proved a capable and independent-minded ruler, whose reign is often considered to have seen a flowering of Scottish culture under the influence of the European Renaissance. He took a direct interest in the administration of justice and frequently moved his court in legal circuits of justice ayres. He defeated a major Northern rebellion, mainly of supporters of the murdered James III. It began in Dunbarton in 1489, led by the Earl of Lennox and Lord Lyle and spreading through the North. James is credited with finally bringing the Lordship of the Isles under control. He forced through the forfeiture of the lands of the last lord John MacDonald in 1493, backing Alexander Gordon, 3rd Earl of Huntly's power in the region and launching a series of naval campaigns and sieges that resulted in the capture or exile of his rivals by 1507.

For a time he supported Perkin Warbeck, the pretender to the English throne, and carried out a brief invasion of England on his behalf in 1496. However, he then established good diplomatic relations with England, and in 1502 signed the Treaty of Perpetual Peace, marrying Henry VII's daughter, Margaret Tudor, thus laying the foundation for the 17th century Union of the Crowns. Animosity with Henry VIII of England helped prompt the renewal of the Auld Alliance in 1512. When the Pope organised a Holy League, which included England, against the French in 1511, James was caught between incompatible diplomatic policies. He tried to suggest an unrealistic European Crusade to Constantinople, but after border skirmishing, when the French were attacked by the English he declared war on England and was excommunicated by the Pope. He sent his navy and gunners to support the French and in 1513 led a major army of perhaps 34,000 over the border. After using his formidable artillery train to take Norham Castle he marched south, where the invasion was stopped decisively on 9 September 1513 at the Battle of Flodden. The King, many of his nobles, and a large number of ordinary troops were killed, commemorated by the song "The Floo'ers o' the Forest". Once again Scotland's government lay in the hands of regents in the name of the infant James V.

Geography
The defining factor in the geography of Scotland is the distinction between the Highlands and Islands in the north and west and the lowlands in the south and east. The highlands are further divided into the Northwest Highlands and the Grampian Mountains by the fault line of the Great Glen. The lowlands are divided into the fertile belt of the Central Lowlands and the higher terrain of the Southern Uplands, which included the Cheviot hills, over which the border with England came to run by the end of the period. The Central Lowland belt averages about 50 miles in width and, because it contains most of the good quality agricultural land and has easier communications, could support most of the urbanisation and elements of conventional medieval government. However, the Southern Uplands, and particularly the Highlands were economically less productive and much more difficult to govern. This provided Scotland with a form of protection, as minor English incursions had to cross the difficult southern uplands and the two major attempts at conquest by the English, under Edward I and then Edward III, were unable to penetrate the highlands, from which area potential resistance could reconquer the lowlands. However, it also made those areas problematic to govern for Scottish kings and much of the political history of the era after the wars of independence circulated around attempts to resolve problems of entrenched localism in these regions.

It was in the later medieval era that the borders of Scotland reached approximately their modern extent. The Isle of Man fell under English control in the 14th century, despite several attempts to restore Scottish authority. The English were able to annexe a large slice of the lowlands under Edward III, but these losses were gradually regained, particularly while England was preoccupied with the Wars of the Roses (1455–85). In 1468 the last great acquisition of Scottish territory occurred when James III married Margaret of Denmark, receiving the Orkney Islands and the Shetland Islands in payment of her dowry. However, in 1482 Berwick, a border fortress and the largest port in medieval Scotland, fell to the English once again, for what was to be the final change of hands.

Demography
Because medieval Scotland lacked the intrusive government and growing bureaucracy that can be found in contemporaneous England, there is very little evidence on which to base reliable estimates of population before the early 18th century. On the basis that it had roughly a sixth of the farmable land of England, it has been suggested that the population would have been of a similar proportion, probably a little less than a million at its height before the Black Death reached the country in 1349. Although there is no reliable documentation on the impact of the plague, there are many anecdotal references to abandoned land in the following decades. If the pattern followed that in England, then the population may have fallen to as low as half a million by the end of the 15th century. Compared with the situation after the redistribution of population in the later clearances and the industrial revolution, these numbers would have been relatively evenly spread over the kingdom, with roughly half living north of the Tay. Perhaps ten per cent of the population lived in one of fifty burghs that existed at the beginning of the period, mainly in the east and south. It has been suggested that they would have had a mean population of about 2,000, but many would be much smaller than 1,000 and the largest, Edinburgh, probably had a population of over 10,000 by the end of the era.

Agriculture
Scotland is roughly half the size of England and Wales, but has only between a fifth and a sixth of the amount of arable or good pastoral land, making marginal pastoral farming and, with its extensive coastline, fishing, the key factors in the medieval economy. With difficult terrain, poor roads and methods of transport there was little trade between different areas of the country and most settlements depended on what was produced locally, often with very little in reserve in bad years. Most farming was based on the lowland farmtoun or highland baile, settlements of a handful of families that jointly farmed an area notionally suitable for two or three plough teams, allocated in run rigs to tenant farmers. They usually ran downhill so that they included both wet and dry land, helping to offset some of the problems of extreme weather conditions. This land was divided into the infield, which was in continuous arable cultivation, and the outfield which was rotated between arable and grass. Most ploughing was done with a heavy wooden plough with an iron coulter, pulled by oxen, who were more effective and cheaper to feed than horses. Obligations to the local lord usually included supplying oxen for ploughing the lord's land on an annual basis and the much-resented obligation to grind corn at the lord's mill. The rural economy appears to have boomed in the 13th century and in the immediate aftermath of the Black Death was still buoyant, but by the 1360s there was a severe falling off of incomes, which can be seen in clerical benefices, of between a third and half compared with the beginning of the era. This was followed by a slow recovery in the 15th century.

Burghs
Most of the burghs were on the east coast, and among them were the largest and wealthiest, including Aberdeen, Perth and Edinburgh, whose growth was facilitated by trade with the continent. Although in the southwest Glasgow was beginning to develop and Ayr and Kirkcudbright had occasional links with Spain and France, sea trade with Ireland was much less profitable. In addition to the major royal burghs this era saw the proliferation of lesser baronial and ecclesiastical burghs, with 51 being created between 1450 and 1516. Most of these were much smaller than their royal counterparts; excluded from international trade, they mainly acted as local markets and centres of craftsmanship. In general burghs probably carried out far more local trading with their hinterlands, relying on them for food and raw materials. The wool trade was a major export at the beginning of the period, but the introduction of sheep-scab was a serious blow to the trade and it began to decline as an export from the early 15th century and despite a levelling off, there was another drop in exports as the markets collapsed in the early-16th century Low Countries. Unlike in England, this did not prompt the Scots to turn to large-scale cloth production and only poor quality rough cloths seem to have been significant.

Crafts, industry and trade
There were relatively few developed crafts in Scotland in this period, although by the later 15th century there were the beginnings of a native iron casting industry, which led to the production of cannon, and of the silver and goldsmithing for which the country would later be known. As a result, the most important exports were unprocessed raw materials, including wool, hides, salt, fish, animals and coal, while Scotland remained frequently short of wood, iron and, in years of bad harvests, grain. Exports of hides and particularly salmon, where the Scots held a decisive advantage in quality over their rivals, appear to have held up much better than wool, despite the general economic downturn in Europe in the aftermath of the plague. The growing desire among the court, lords, upper clergy and wealthier merchants for luxury goods that largely had to be imported led to a chronic shortage of bullion. This, and perennial problems in royal finance, led to several debasements of the coinage, with the amount of silver in a penny being cut to almost a fifth between the late 14th century and the late 15th century. The heavily debased "black money" introduced in 1480 had to be withdrawn two years later and may have helped fuel a financial and political crisis.

Kinship and clans
The fundamental social bond in late medieval Scottish society was that of kinship. Descent was agnatic, with members of a group sharing a (sometimes fictional) common ancestor, in the south often reflected in a common surname. Unlike in England, where kinship was predominately cognatic (derived through both males and females), women retained their original surname at marriage and marriages were intended to create friendship between kin groups, rather than a new bond of kinship. As a result, a shared surname has been seen as a "test of kinship", proving large bodies of kin who could call on each other's support and this could help intensify the idea of the feud, which was usually carried out as a form of revenge for a kinsman and for which a large body of kin could be counted on to support rival sides, although conflict between members of kin groups also occurred.

The combination of agnatic kinship and a feudal system of obligation has been seen as creating the highland clan system, evident in records from the 13th century. Surnames were rare in the highlands until the 17th and 18th centuries and in the Middle Ages all members of a clan did not share a name and most ordinary members were usually not related to its head. The head of a clan in the beginning of the era was often the strongest male in the main sept or branch of the clan, but later, as primogeniture began to dominate, was usually the eldest son of the last chief. The leading families of a clan formed the fine, often seen as equivalent to lowland gentlemen, providing council in peace and leadership in war, and below them were the daoine usisle (in Gaelic) or tacksmen (in Scots), who managed the clan lands and collected the rents. In the isles and along the adjacent western seaboard there were also buannachann, who acted as a military elite, defending the clan lands from raids or taking part in attacks on clan enemies. Most of the followers of the clan were tenants, who supplied labour to the clan heads and sometimes act as soldiers. In the early modern era they would take the clan name as their surname, turning the clan into a massive, if often fictive, kin group.

Social structure
In the late medieval era the terminology used to describe the different ranks of Scottish social structure was increasingly dominated by the Scots language and as a result began to parallel the terminology used in England. This consciousness over status was reflected in military and (from 1430) sumptuary legislation, which set out the types of weapons and armour that should be maintained, and clothes that could be worn, by various ranks. Below the king were a small number of dukes (usually descended from very close relatives of the king) and earls, who formed the senior nobility. Below them were the barons, and, from the 1440s, fulfilling the same role were the lords of Parliament, the lowest level of the nobility with the rank-given right to attend the Estates. There were perhaps 40 to 60 of these in Scotland throughout the period. Members of these noble ranks, perhaps particularly those that had performed military or administrative service to the Crown, might also be eligible for the status of knighthood. Below these were the lairds, roughly equivalent to the English gentlemen. Most were in some sense in the service of the major nobility, either in terms of land or military obligations, roughly half sharing with them their name and a distant and often uncertain form of kinship. Serfdom died out in Scotland in the 14th century, although through the system of courts baron landlords still exerted considerable control over their tenants. Below the lords and lairds were a variety of groups, often ill-defined. These included yeomen, sometimes called "bonnet lairds", often owning substantial land, and below them the husbandmen, lesser landholders and free tenants that made up the majority of the working population. Society in the burghs was headed by wealthier merchants, who often held local office as a burgess, alderman, bailies or as a member of the council. A small number of these successful merchants were dubbed knights for their service by the king by the end of the era, although this seems to have been an exceptional form of civic knighthood that did not put them on a par with landed knights. Below them were craftsmen and workers that made up the majority of the urban population.

Social conflict
Historians have noted considerable political conflict in the burghs between the great merchants and craftsmen throughout the period. Merchants attempted to prevent lower crafts and gilds from infringing on their trade, monopolies and political power. Craftsmen attempted to emphasise their importance and to break into disputed areas of economic activity, setting prices and standards of workmanship. In the 15th century a series of statutes cemented the political position of the merchants, with limitations on the ability of residents to influence the composition of burgh councils and many of the functions of regulation taken on by the bailies. In rural society historians have noted a lack of evidence of widespread unrest similar to that evidenced by the Jacquerie of 1358 in France and the Peasants' Revolt of 1381 in England, possibly because there was relatively little of the type of change in agriculture, like the enclosure of common land, that could create widespread resentment before the modern era. Instead, a major factor was the willingness of tenants to support their betters in any conflict in which they were involved, for which landlords reciprocated with charity and support. Highland and border society acquired a reputation for lawless activity, particularly the feud. However, more recent interpretations have pointed to the feud as a means of preventing and speedily resolving disputes by forcing arbitration, compensation and resolution.

The Crown
The Crown was at the centre of government in late medieval Scotland. The unification of the kingdom, the spread of Anglo-Norman custom, the development of a European trading economy and Robert I's success in achieving independence from England, all did much to build up the prestige of the institution. However, its authority within the kingdom was not unchallenged, not least from the many semi-independent lordships and it endured a series of crises, particularly frequent minorities and resulting regencies. All of this, in addition to the relative poverty of the kingdom and the lack of a system of regular taxation, helped to limit the scale of central administration and government. Much more than the English monarchy, the Scottish court remained a largely itinerant institution, with the king moving between royal castles, particularly Perth and Stirling, but also holding judicial sessions throughout the kingdom, with Edinburgh only beginning to emerge as the capital in the reign of James III at the cost of considerable unpopularity. Like most Western European monarchies, the Scottish Crown in the 15th century adopted the example of the Burgundian court, through formality and elegance putting itself at the centre of culture and political life, defined with display, ritual and pageantry, reflected in elaborate new palaces and patronage of the arts.

Privy Council
After the Crown the most important government institution was the Privy Council, composed of the king's closest advisers, but which, unlike in England, retained legislative and judicial powers. It was relatively small, with normally less than 10 members in a meeting, some of whom were nominated by Parliament, particularly during the many minorities of the era, as a means of limiting the power of a regent. The council was a virtually full-time institution by the late 15th century, and surviving records from the period indicate it was critical in the working of royal justice. Nominally members of the council were some of the great magnates of the realm, but they rarely attended meetings. Most of the active members of the council for most of the period were career administrators and lawyers, almost exclusively university-educated clergy, the most successful of which moved on to occupy the major ecclesiastical positions in the realm as bishops and, towards the end of the period, archbishops. By the end of the 15th century this group was being joined by increasing numbers of literate laymen, often secular lawyers, of which the most successful gained preferment in the judicial system and grants of lands and lordships. From the reign of James III onwards the clerically dominated post of Lord Chancellor was increasingly taken by leading laymen.

Parliament
The next most important body in the process of government was parliament, which had evolved by the late 13th century from the King's Council of Bishops and Earls into a 'colloquium' with a political and judicial role. By the early 14th century, the attendance of knights and freeholders had become important, and probably from 1326 burgh commissioners joined them to form the Three Estates, meeting in a variety of major towns throughout the kingdom. It acquired significant powers over particular issues, including consent for taxation, but it also had a strong influence over justice, foreign policy, war, and other legislation, whether political, ecclesiastical, social or economic. From the early 1450s, a great deal of the legislative business of the Scottish Parliament was usually carried out by a parliamentary committee known as the 'Lords of the Articles', chosen by the three estates to draft legislation which was then presented to the full assembly to be confirmed. Parliamentary business was also carried out by 'sister' institutions, before c. 1500 by General Council and thereafter by the Convention of Estates. These could carry out much business also dealt with by Parliament—taxation, legislation and policy-making—but lacked the ultimate authority of a full parliament. In the 15th century parliament was being called on an almost annual basis, more often than its English counterpart, and was willing to offer occasional resistance or criticism to the policies of the Crown, particularly in the unpopular reign of James III. However, from about 1494, after his success against the Stewarts and Douglases and over rebels in 1482 and 1488, James IV managed to largely dispense with the institution and it might have declined, like many other systems of Estates in continental Europe, had it not been for his death in 1513 and another long minority.

Local government
At a local level, government combined traditional kinship-based lordships with a relatively small system of royal offices. Until the 15th century the ancient pattern of major lordships survived largely intact, with the addition of two new "scattered earldoms" of Douglas and Crawford, thanks to royal patronage after the Wars of Independence, mainly in the borders and south-west. The dominant kindred were the Stewarts, who came to control many of the earldoms. Their acquisition of the Crown, and a series of internal conflicts and confiscations, meant that by around the 1460s the monarchy had transformed its position within the realm, gaining control of most of the "provincial" earldoms and lordships. Rather than running semi-independent lordships, the major magnates now had scattered estates and occasional regions of major influence. In the lowlands the Crown was now able to administer government through a system of sheriffdoms and other appointed officers, rather than semi-independent lordships. In the highlands James II created two new provincial earldoms for his favourites: Argyll for the Campbells and Huntly for the Gordons, which acted as a bulwark against the vast Lordship of the Isles built up by the Macdonalds. James IV largely resolved the Macdonald problem by annexing the estates and titles of John Macdonald II to the Crown in 1493 after discovering his plans for an alliance with the English.

Armies
Scottish armies of the late medieval era depended on a combination of familial, communal and feudal forms of service. "Scottish service" (servitum Scoticanum), also known as "common service" (communis exertcitus), a levy of all able-bodied freemen aged between 16 and 60, provided the bulk of armed forces, with (according to decrees) 8 days warning. Feudal obligations, by which knights held castles and estates in exchange for service, provided troops on a 40-day basis. By the second half of the 14th century money contracts of bonds or bands of manrent, similar to English indentures of the same period, were being used to retain more professional troops, particularly men-at-arms and archers. In practice forms of service tended to blur and overlap and several major Scottish lords brought contingents from their kindred.

These systems produced relatively large numbers of poorly armoured infantry, often armed with 12–14 foot spears. They often formed the large close order defensive formations of shiltrons, able to counter mounted knights as they did at Bannockburn, but vulnerable to arrows (and later artillery fire) and relatively immobile, as they proved at Halidon Hill. There were attempts to replace spears with longer pikes of 15½ to 18½ feet in the later 15th century, in emulation of successes over mounted troops in the Netherlands and Switzerland, but this does not appear to have been successful until the eve of the Flodden campaign in early 16th century. There were smaller numbers of archers and men-at-arms, who were often outnumbered when facing the English on the battlefield. Archers became much sought after as mercenaries in French armies of the 15th century to help counter the English superiority in this arm, becoming a major element of the French royal guards as the Garde Écossaise. Scottish men-at-arms often dismounted to fight beside the infantry, with perhaps a small mounted reserve, and it has been suggested that these tactics were copied and refined by the English, leading to their successes in the Hundred Years' War.

Artillery
The Stewarts attempted to follow France and England in building up an artillery train. The abortive siege of Roxburgh in 1436 under James I was probably the first conflict in which the Scots made serious use of artillery. James II had a royal gunner and received gifts of artillery from the continent, including two giant bombards made for Philip the Good, Duke of Burgundy, one of which, Mons Meg, still survives. Although these were probably already outdated on the continent, they represented impressive military technology when they reached Scotland. James II enthusiasm for artillery cost him his life, and James III also experienced ill-fortune when artillery sent from Sigismund, Archduke of Austria, sank in a storm en route to Scotland in 1481. James IV brought in experts from France, Germany and the Netherlands and established a foundry in 1511. Edinburgh Castle had a house of artillery where visitors could see cannons cast for what became a formidable train, allowing him to send cannons to France and Ireland and to quickly subdue Norham Castle in the Flodden campaign. However, 18 heavy artillery pieces had to be drawn by 400 oxen and slowed the advancing army, proving ineffective against the longer range and smaller calibre English guns at the Battle of Flodden.

Navy
After the establishment of Scottish independence, Robert I turned his attention to building up a Scottish naval capacity. This was largely focused on the west coast, with the Exchequer Rolls of 1326 recording the feudal duties of his vassals in that region to aid him with their vessels and crews. Towards the end of his reign he supervised the building of at least one royal man-of-war near his palace at Cardross on the River Clyde. In the late 14th century naval warfare with England was conducted largely by hired Scots, Flemish and French merchantmen and privateers. James I took a greater interest in naval power. After his return to Scotland in 1424 he established a shipbuilding yard at Leith, a house for marine stores, and a workshop. King's ships, one of which accompanied him on his expedition to the Islands in 1429, were built and equipped there to be used for trade as well as war, and the office of Lord High Admiral was probably founded in this period. In his struggles with his nobles in 1488 James III received assistance from his two warships the Flower and the King's Carvel also known as the Yellow Carvel.

James IV put the enterprise on a new footing, founding a new harbour at Newhaven in May 1504, and two years later ordered the construction of a dockyard at the Pools of Airth. The upper reaches of the Forth were protected by new fortifications on Inchgarvie. The king acquired a total of 38 ships for the Royal Scottish Navy, including the Margaret, and the carrack Michael or Great Michael. The latter, built at great expense at Newhaven and launched in 1511, was 240 ft in length, weighed 1,000 tons, had 24 cannon, and was, at that time, the largest ship in Europe. Scottish ships had some success against privateers, accompanied the king in his expeditions in the islands and intervened in conflicts in Scandinavia and the Baltic. In the Flodden campaign the fleet consisted of 16 large and 10 smaller craft. After a raid on Carrickfergus in Ireland, it joined up with the French and had little impact on the war. After the disaster at Flodden the Great Michael, and perhaps other ships, were sold to the French and the king's ships disappeared from royal records after 1516.

The Church
Since gaining its independence from English ecclesiastical organisation in 1192, the Catholic Church in Scotland had been a "special daughter of the see of Rome", enjoying a direct relationship with the Papacy. Lacking archbishoprics, it was in practice run by special councils made up of all the bishops, with the bishop of St Andrews emerging as the most important player, until in 1472 St Andrews became the first archbishopric, to be followed by Glasgow in 1492. Late medieval religion had its political aspects, with Robert I carrying the brecbennoch (or Monymusk reliquary), said to contain the remains of St. Columba, into battle at Bannockburn and James IV using his pilgrimages to Tain and Whithorn to help bring Ross and Galloway under royal authority. There were also further attempts to differentiate Scottish liturgical practice from that in England, with a printing press established under royal patent in 1507 to replace the English Sarum Use for services. As elsewhere in Europe, the collapse of papal authority in the Papal Schism allowed the Scottish Crown to gain effective control of major ecclesiastical appointments within the kingdom, a position recognised by the Papacy in 1487. This led to the placement of clients and relatives of the king in key positions, including James IV's illegitimate son Alexander, who was nominated as Archbishop of St. Andrews at the age of 11, intensifying royal influence and also opening the Church to accusations of venality and nepotism. Despite this, relationships between the Scottish crown and the Papacy were generally good, with James IV receiving tokens of papal favour.

Popular practice
Traditional Protestant historiography tended to stress the corruption and unpopularity of the late medieval Scottish church, but more recent research has indicated how it met the spiritual needs of different social groups. Historians have discerned a decline of monasticism in this period, with many religious houses keeping smaller numbers of monks, and those remaining often abandoning communal living for a more individual and secular lifestyle. New monastic endowments from the nobility also declined in the 15th century. In contrast, the burghs saw the flourishing of mendicant orders of friars in the later 15th century, who emphasised preaching and ministering to the population. The order of Observant Friars was organised as a Scottish province from 1467 and the older Franciscans and Dominicans were recognised as separate provinces in the 1480s. In most burghs, in contrast to English towns where churches tended to proliferate, there was usually only one parish church, but as the doctrine of Purgatory gained in importance in the period, the number of chapelries, priests and masses for the dead within them grew rapidly. The number of altars to saints also grew dramatically, with St. Mary's in Dundee having perhaps 48 and St Giles' in Edinburgh over 50, as did the number of saints celebrated in Scotland, with about 90 being added to the missal used in St Nicholas church in Aberdeen. New cults of devotion connected with Jesus and the Virgin Mary also began to reach Scotland in the 15th century, including The Five Wounds, The Holy Blood and The Holy Name of Jesus and new feasts including The Presentation, The Visitation and Mary of the Snows. In the early 14th century the Papacy managed to minimise the problem of clerical pluralism, but with relatively poor livings and a shortage of clergy, particularly after the Black Death, in the 15th century the number of clerics holding two or more livings rapidly increased. This meant that parish clergy were largely drawn from the lower and less educated ranks of the profession, leading to frequent complaints about their standards of education or ability, although there is little clear evidence that this was actually declining. Heresy, in the form of Lollardry, began to reach Scotland from England and Bohemia in the early 15th century, but despite evidence of a number of burnings of heretics and some apparent support for its anti-sacramental elements, it probably remained a relatively small movement.

Education
In medieval Scotland, education was dominated by the Church and largely aimed at the training and education of clerics. In the later medieval period, there was a general increase in the number of educational institutions as well as increasing use by the laity. These included private tuition in the families of lords and wealthy burghers, song schools attached to most major churches and an increasing number of grammar schools, particularly in the expanding burghs. These were almost exclusively aimed at boys, but by the end of the 15th century Edinburgh also had schools for girls. The growing emphasis on education cumulated with the passing of the Education Act 1496, which decreed that all sons of barons and freeholders of substance should attend grammar schools. All this increased literacy, but it was largely concentrated among a male and wealthy elite, with perhaps 60 per cent of the nobility being literate by the end of the period.

Until the 15th century those who wished to attend university had to travel to England or the continent, but this situation was transformed by the founding of the University of St Andrews in 1413, the University of Glasgow in 1451 and the University of Aberdeen in 1495. Initially these institutions were designed for the training of clerics, but they would increasingly be used by laymen who would begin to challenge the clerical monopoly of administrative posts in the government and law. Scottish scholars continued to visit the continent for their second degrees and this international contact helped bring the new ideas of humanism back into Scottish intellectual life.

Art and architecture
Scotland is known for its dramatically placed castles, many of which date from the late medieval era. In contrast to England, where the wealthy began to move towards more comfortable grand houses, these continued to be built into the modern period, developing into the style of Scottish Baronial architecture in the 19th century, popular amongst the minor aristocracy and merchant class. This building type, often built with defence in mind in the form of the tower house, was characterised by corbelled turrets and crow-stepped gables marked the first uniquely Scottish mode of building. Ceilings of these houses were decorated with vividly coloured painting on boards and beams, using emblematic motifs from European pattern books or the artist's interpretation of trailing grotesque patterns. The grandest buildings of this type were the royal palaces in this style at Linlithgow, Holyrood, Falkland and the remodelled Stirling Castle, all of which have elements of continental European architecture, particularly from France and the Low Countries, adapted to Scottish idioms and materials (particularly stone and harl). More modest buildings with continental influences can be seen in the late 15th century western tower of St Mary's parish church, Dundee, and tollbooths like the one at Dunbar.

Parish church architecture in Scotland was often much less elaborate than in England, with many churches remaining simple oblongs, without transepts and aisles, and often without towers. In the highlands, they were often even simpler, many built of rubble masonry and sometimes indistinguishable from the outside from houses or farm buildings. However, there were some churches built in a grander continental style. French master mason John Morrow was employed at the building of Glasgow Cathedral and the rebuilding of Melrose Abbey, both considered fine examples of Gothic architecture. The interiors of churches were often more elaborate before the Reformation, with highly decorated sacrament houses, like the ones surviving at Deskford and Kinkell. The carvings at Rosslyn Chapel, created in the mid-15th century, elaborately depicting the progression of the seven deadly sins, are considered some of the finest in the Gothic style. Late medieval Scottish churches also often contained elaborate burial monuments, like the Douglas tombs in the town of Douglas.

There is relatively little information about native Scottish artists during the late Middle Ages. As in England, the monarchy may have had model portraits used for copies and reproductions, but the versions that survive are generally crude by continental standards. Much more impressive are the works or artists imported from the continent, particularly the Netherlands, generally considered the centre of painting in the Northern Renaissance. The products of these connections included the delicate hanging lamp in St. John's Kirk in Perth; the tabernacles and images of St Catherine and St John brought to Dunkeld, and vestments and hangings in Holyrood; Hugo van Der Goes's altarpiece for the Trinity College Church in Edinburgh, commissioned by James III, the work after which the Flemish Master of James IV of Scotland is named, and the illustrated Flemish Bening Book of Hours, given by James IV to Margaret Tudor.

Language and literature
It was in this period that the Scots language became the dominant language of the state and the social elite, while also becoming linked with Scottish national identity and making inroads into the highland zone at the expense of Gaelic. Middle Scots, often called "English" in this period, was derived largely from Old English, with the addition of elements from Gaelic and French. Although resembling the language spoken in northern England, it became a distinct dialect from the late 14th century onwards. It was the dominant language of the lowlands and borders, brought there largely by Anglo-Saxon settlers from the 5th century, but began to be adopted by the ruling elite as they gradually abandoned French in the late medieval era. By the 15th century it was the language of government, with acts of parliament, council records, and treasurer's accounts almost all using it from the reign of James I onwards. As a result, Gaelic, once dominant north of the Tay, began a steady decline.

Gaelic was the language of the bardic tradition, which provided a mechanism for the transference of oral culture from generation to generation. Members of bardic schools were trained in the complex rules and forms of Gaelic poetry. In a non-literate society, they were the repositories of knowledge, including not just stories and songs, but also genealogies and medicine. They were found in many of the courts of the great lords, down to the chiefdoms of the highlands at the beginning of the period. The bardic tradition was not completely isolated from trends elsewhere, including love poetry influenced by continental developments and medical manuscripts from Padua, Salerno and Montpellier translated from Latin. The Gaelic oral tradition also began to manifest itself in written form, with the great compilation of Gaelic poetry, the Book of the Dean of Lismore produced by James and Duncan MacGregor at the beginning of the 16th century, probably designed for use in the courts of the greater chiefs. However, by the 15th century lowland writers were beginning to treat Gaelic as a second-class, rustic and even amusing language, helping to frame attitudes towards the highlands and to create a cultural gulf with the lowlands.

It was Scots that emerged as the language of national literature in Scotland. The first surviving major text is John Barbour's Brus (1375), composed under the patronage of Robert II and telling the story in epic poetry of Robert I's actions before the English invasion until the end of the war of independence. The work was extremely popular among the Scots-speaking aristocracy and Barbour is referred to as the father of Scots poetry, holding a similar place to his contemporary Chaucer in England. In the early 15th century these were followed by Andrew of Wyntoun's verse Orygynale Cronykil of Scotland and Blind Harry's The Wallace, which blended historical romance with the verse chronicle. They were probably influenced by Scots versions of popular French romances that were also produced in the period, including The Buik of Alexander, Launcelot o the Laik and The Porteous of Noblenes by Gibert Hay.

Much Middle Scots literature was produced by makars, poets with links to the royal court. These included James I who wrote The Kingis Quair. Many of the makars had a university education and so were also connected with the Kirk. However, Dunbar's Lament for the Makaris (c. 1505) provides evidence of a wider tradition of secular writing outside of Court and Kirk now largely lost. Before the advent of printing in Scotland, writers such as Robert Henryson, William Dunbar, Walter Kennedy and Gavin Douglas have been seen as leading a golden age in Scottish poetry.

In the late 15th century, Scots prose also began to develop as a genre. Although there are earlier fragments of original Scots prose, such as the Auchinleck Chronicle, the first complete surviving works include John Ireland's The Meroure of Wyssdome (1490). There were also prose translations of French books of chivalry that survive from the 1450s, including The Book of the Law of Armys and the Order of Knychthode and the treatise Secreta Secetorum, an Arabic work believed to be Aristotle's advice to Alexander the Great. The landmark work in the reign of James IV was Gavin Douglas's version of Virgil's Aeneid, the Eneados, which was the first complete translation of a major classical text in an Anglian language, finished in 1513, but overshadowed by the disaster at Flodden.

Music
Bards, who acted as musicians, but also as poets, storytellers, historians, genealogists and lawyers, relying on an oral tradition that stretched back generations, were found in Scotland as well as Wales and Ireland. Often accompanying themselves on the harp, they can also be seen in records of the Scottish courts throughout the medieval period. Scottish church music from the later Middle Ages was increasingly influenced by continental developments, with figures like 13th-century musical theorist Simon Tailler studying in Paris before returning to Scotland, where he introduced several reforms in church music. Scottish collections of music like the 13th-century 'Wolfenbüttel 677', which is associated with St Andrews, contain mostly French compositions, but with some distinctive local styles. The captivity of James I in England from 1406 to 1423, where he earned a reputation as a poet and composer, may have led him to take English and continental styles and musicians back to the Scottish court on his release. In the late 15th century a series of Scottish musicians trained in the Netherlands before returning home, including John Broune, Thomas Inglis and John Fety, the last of whom became master of the song school in Aberdeen and then Edinburgh, introducing the new five-fingered organ playing technique. In 1501 James IV refounded the Chapel Royal within Stirling Castle, with a new and enlarged choir, and it became the focus of Scottish liturgical music. Burgundian and English influences were probably reinforced when Henry VII's daughter Margaret Tudor married James IV in 1503.

National identity
The late Middle Ages has often been seen as the era in which Scottish national identity was initially forged, in opposition to English attempts to annexe the country and as a result of social and cultural changes. English invasions and interference in Scotland have been judged to have created a sense of national unity and a hatred towards England which dominated Scottish foreign policy well into the 15th century, making it extremely difficult for Scottish kings like James III and James IV to pursue policies of peace towards their southern neighbour. In particular the Declaration of Arbroath asserted the ancient distinctiveness of Scotland in the face of English aggression, arguing that it was the role of the king to defend the independence of the community of Scotland. This document has been seen as the first "nationalist theory of sovereignty".

The adoption of Middle Scots by the aristocracy has been seen as building a shared sense of national solidarity and culture between rulers and ruled, although the fact that north of the Tay Gaelic still dominated may have helped widen the cultural divide between highlands and lowlands. The national literature of Scotland created in the late medieval period employed legend and history in the service of the Crown and nationalism, helping to foster a sense of national identity at least within its elite audience. The epic poetic history of the Brus and Wallace helped outline a narrative of united struggle against the English enemy. Arthurian literature differed from the conventional version of the legend by treating Arthur as a villain and Mordred, the son of the king of the Picts, as a hero. The origin myth of the Scots, systematised by John of Fordun (c. 1320-c. 1384), traced their beginnings from the Greek prince Gathelus and his Egyptian wife Scota, allowing them to argue superiority over the English, who claimed their descent from the Trojans, who had been defeated by the Greeks.

It was in this period that the national flag emerged as a common symbol. The image of St. Andrew, martyred while bound to an X-shaped cross, first appeared in the Kingdom of Scotland during the reign of William I and was again depicted on seals used during the late 13th century; including on one particular example used by the Guardians of Scotland, dated 1286. Use of a simplified symbol associated with Saint Andrew, the saltire, has its origins in the late 14th century; the Parliament of Scotland decreed in 1385 that Scottish soldiers should wear a white Saint Andrew's Cross on their person, both in front and behind, for the purpose of identification. The use of a blue background for the Saint Andrew's Cross is said to date from at least the 15th century. The earliest reference to the Saint Andrew's Cross as a flag is to be found in the Vienna Book of Hours, circa 1503.