Robert Stewart (1339 - 3 September 1420) was a Scottish prince and nobleman who ruled the Kingdom of Scotland as its effective monarch, under the title of Governor of Scotland, from 1406 until his death. Robert governed on behalf of his exiled nephew, King James I. Prior to his tenure as governor, Robert acted as regent at various times for his father, King Robert II, and his eldest brother, King Robert III.

The most powerful nobleman in Scotland for much of his life, Robert held the titles of Duke of Albany, Earl of Fife, and Earl of Menteith. His rule saw extensive warfare with the Kingdom of England, which was intertwined with both the Anglo-Scottish Wars and the Hundred Years' War, along with conflict in northern Scotland against the Lordship of the Isles. A ruthless politician, he was widely blamed for the death of his nephew, David, Duke of Rothesay, in 1402. Robert's rule witnessed architectural and cultural developments in Scotland, including the construction of Doune Castle and the establishment of the University of St Andrews, the first such institution in the kingdom. Robert's support of Antipope Benedict XIII during the Western Schism provoked domestic and international controversy. After his death in 1420, Robert was succeeded as governor by his eldest son, Murdoch.

Early life and career Robert was born in 1339. He was the third son of Robert Stewart, High Steward of Scotland, a grandson of Robert the Bruce and the heir presumptive to the Scottish throne. Robert's mother was Elizabeth Mure, the daughter of Adam Mure of Rowallan, a landowner in Ayrshire. Prior to his birth, Robert's parents had entered into a secular marriage, which was not recognized by the Catholic Church. After their father appealed to Pope Clement VI, Robert and his siblings were legitimated in 1347. Robert's mother probably died during the early 1350s.

Robert was born during the reign of his paternal great-uncle, David II of Scotland. David II was captured at the Battle of Neville's Cross in 1346, during a failed Scottish invasion of England, after which a general council elected Robert's father as regent of Scotland. David II was unable to negotiate his return to Scotland until 1357, when he paid a ransom of 100,000 merks for his release from captivity. Robert was likely sent to England as one of the mandated hostages for his great-uncle's ransom in 1358. Robert's detention was brief, and he was exchanged shortly afterwards for his eldest brother, John Stewart of Kyle, who remained in England for several years.

First marriage Robert married Margaret Graham, Countess of Menteith, as her fourth husband, around September 1361. A papal dispensation for their marriage was dated 9 September 1361. Their first child, Murdoch, was born in 1362.Oxford Dictionary of National Biography, entry for Murdoch Stewart, Duke of Albany Robert initiated his longstanding political alliance with Duncan, Earl of Lennox, by naming Duncan as Murdoch's godfather. Margaret's marriage to Robert was a political reverse for David II, who had sought to prevent Stewart control of Menteith by promoting the Drummond family in the earldom. David II expressed his opposition to Robert's marriage to Margaret by denying him the title of Earl of Menteith. Robert was instead forced to style himself as Lord of Menteith. In the wake of these events, David II likely regarded his marriage to Margaret Drummond in 1364 as a challenge to the power of the Stewart dynasty.

Rebellion of 1363 In early 1363, Robert took part in a rebellion against David II, which included his father, Robert the Steward, his eldest brother, John Stewart of Kyle, and a coalition of noblemen including William Douglas, Earl of Douglas, and Patrick Dunbar, Earl of March. The rebellion against David was sparked by the local political concerns of the Scottish nobility. Robert's father opposed David's interference in the earldom of Fife, where Robert's elder brother, Walter, had briefly married Isabella, Countess of Fife. After Walter's death in 1362, the king forced Isabella to marry the crusader Thomas Bisset, a prominent knight at the royal court. Besides his father's dispute with David over Fife, Robert himself was probably angered by the marriage of Archibald the Grim, the king's favorite knight, to Joanna Murray in 1362. As the daughter of Maurice, Earl of Strathearn, Joanna was the heiress to considerable lands in Menteith, and the marriage disrupted Robert's own claims to the earldom by right of his wife.

The Earl of Douglas likely led armed opposition to the king. Deploying an army of paid retainers and cavalry, David II quickly defeated the rebellion. Robert's father was forced to submit to David II at Inchmurdoch on 14 May 1363. During the rebellion, Robert himself may have fought against Archibald the Grim, who supported the king, over their competing claims to the Murray inheritance in Menteith.

Later reign of David II Robert was named, alongside his father, as one of the noblemen who would remain at Scone to conduct the business of the parliament of 1367, while other members of the nobility returned home for the harvest. Robert appeared at another parliament in June 1368, where he unsuccessfully attempted to pursue his dispute with Archibald the Grim over the Murray inheritance. David II ordered Robert to argue his legal case against Archibald in a lesser court than parliament.

David II attended the parliament of 1368 in person, where he warned Robert "in his own voice" not to aid the supporters of John of Islay, Lord of the Isles, with whom he was now in conflict. Robert was summoned to parliament at Perth in March 1369, where he swore an oath to uphold law and order in the earldom of Menteith, probably in connection with the conflict in the north. Robert, his eldest brother, and his father were faced with the penalties of treason for disobeying this oath. Robert's father was imprisoned by David II at Lochleven Castle around this time, possibly as a result of the Stewart family's alliance with John, Lord of the Isles. Robert himself may have been briefly imprisoned, while his younger brother, Alexander, was certainly sent to Lochleven alongside their father.

David II died at Edinburgh Castle on 22 February 1371, and Robert's father, Robert the Steward, succeeded as King of Scots. Robert's father was crowned as King Robert II at Scone Abbey on 26 March 1371. Robert attended the coronation, where he swore a personal oath of fealty to his father. By the time of the coronation, Robert's father had already allowed him to assume the full title of Earl of Menteith.

Acquisition of Fife The recognition of Robert's full rights in Menteith was the prelude to his rapid rise to prominence in Scotland. Robert's ascendance was supported by his father as part of the king's policy of establishing each of his sons as great noblemen, with significant lands and titles. Robert met with Isabella, Countess of Fife, in Perth, shortly after his father's coronation. At this meeting, Robert secured Isabella's support for his claims to the earldom of Fife, as heir to his elder brother, Walter, who had briefly been married to Isabella. Despite Isabella's support for his claims to Fife, Robert's legal dispute with the nominal Lord of Fife, John Dunbar, lasted for more than a year. Robert's father helped negotiate a political compromise in 1372, whereby Robert assumed the title of Earl of Fife and Dunbar was created Earl of Moray in compensation. Robert was calling himself Earl of Fife by April 1372. Robert's acquisition of Fife reflected his status as one of the most important noblemen in Scotland, second only to his eldest brother, John, Earl of Carrick, the heir to the throne.

In 1373 the Parliament of Scotland declared that Robert and his eldest son, Murdoch, would have precedence in the royal succession over Robert's nieces, Margaret and Elizabeth, the daughters of his eldest brother, John, Earl of Carrick. Robert's rivalry with his eldest brother was probably fuelled by the succession law of 1373. Robert was second in line to the Scottish throne until the birth of his nephew, David, in 1378.

Increasing prominence

Probably during the 1370s, Robert began the construction of Doune Castle, which became the seat of his earldom of Menteith. Robert built his new castle on the site of an earlier fortification, which may have been built by his collateral ancestor, Walter Bailloch. Robert's architectural works at Doune, which included a large, self-enclosed keep, bore similarities to contemporary European noble residences, such as the Château de Pierrefonds. Robert probably intended Doune to serve as a compliment to nearby Stirling Castle, which he controlled after 1373. Robert's construction of Doune also allowed him to consolidate his hold on Menteith. As his influence in the earldom grew, Robert may have begun to patronize the local cult of St. Fillan. Robert's anxiety over his position in Menteith was likely driven by the death of his wife, Margaret, Countess of Menteith, on an unknown date in . Robert continued to use the title of Earl of Menteith after his wife's death, and successfully ignored the rights of his wife's children by John Drummond to inherit Menteith, likely with his father's support.

Robert participated in march days, meetings of Scottish and English representatives to settle disputes in the Debatable Lands, alongside his eldest brother, during the late 1370s. In 1378, Robert and his younger brother, David, Earl of Strathearn, fought alongside Archibald the Grim in a battle at Melrose against an English raiding party. Robert's cooperation with Archibald in the 1378 campaign signaled the improved relationship between the two men, after Robert II had officially recognized Archibald's claim to the Murray inheritance.

Second marriage Robert's first wife, Margaret, died in . In May 1380, Robert obtained a dispensation from the Avignon antipope, Clement VII, to marry Muriella Keith, a daughter of William Keith, the hereditary Great Marischal of Scotland. Little is known about Muriella. Robert's eldest child by Muriella, John, was born in . Robert developed a close relationship with his father-in-law, William Keith, after 1380, and the two men were frequently in each other's company. Robert's marriage to Muriella allowed him to develop a close political alliance with the Keith family, which was influential in north-eastern Scotland. Robert's support enabled William Keith to build a tower house at Dunnottar.

Brother's seizure of power Robert became Chamberlain of Scotland in 1382, after the assassination of the previous chamberlain, John Lyon of Glamis.

By 1382, Robert II was facing opposition to his rule from powerful segments of the Scottish nobility, most notability the affinity of his eldest son, John, Earl of Carrick, along with various members of the Douglas family. The king was criticized for his controversial promotion of his fourth son, Robert's younger brother Alexander, in the earldom of Ross in 1382. Meanwhile, a period of developing conflict between Scotland and England led directly to an English invasion of Scotland in 1384. The English army, led by John of Gaunt, devastated the region of East Lothian. Robert II was criticized for his response to the English invasion, which was viewed as prevaricating and indecisive. John, Earl of Carrick, took advantage of his father's political difficulties to seize power in November 1384. During a general council at Holyrood Abbey, Robert II effectively abdicated much of his authority to his eldest son, who was named as Guardian of Scotland.