Six weeks before he seized the Scottish crown in March 1306, Robert the Bruce murdered his closest political rival.

He’d arranged to meet longtime opponent John “the Red” Comyn at a priory in Dumfries in southern Scotland, ostensibly to discuss “certain business touching them both,” but quickly changed tactics, accused Comyn of treachery and struck him down. As Comyn lay bleeding at the foot of the shrine, Bruce retreated, giving the friars a chance to tend to the fallen man’s wounds. But he then learned his target was still alive and sent several men back to finish the bloody task. As Walter of Guisborough wrote around 1308, when Comyn “had confessed and was truly repentant, by the tyrant's order he was dragged out of the vestry and killed on the steps of the high altar.”

The murder—described by the English the following year as “outrageous sacrilege inhumanly committed against God and the holy Church”—placed Bruce on a collision course with Scotland’s imposing neighbor, England. But the motivations behind the act remain as mired in uncertainty as the legacy of the warrior king himself. Alternately painted as a patriot whose perseverance secured his nation’s independence and a more shadowy figure with dangerous ambitions and a tenuous sense of allegiance, Bruce remains one of Scottish history’s most controversial characters, and one of the few whose name is easily recognized by non-Scots.

Director David McKenzie’s upcoming Netflix biopic, The Outlaw King, represents one of the first major film adaptations of Bruce’s story. (The 1995 epic Braveheart finds a younger Bruce intersecting with Mel Gibson’s William Wallace but concludes long before Bruce becomes the Scots’ leader.) Starring Chris Pine as the titular character, Outlaw King picks up roughly where Braveheart left off, chronicling Wallace’s downfall, Bruce’s subsequent rise and the middle years of the First War of Scottish Independence.

Bruce’s transformation from the much derided “King Hob,” or King Nobody, to protector of Scotland happened slowly and is more nuanced than suggested by Outlaw King, which compresses the historical timeline and tends to skirt unsavory aspects of Bruce’s personality in favor of presenting a conflicted, even reluctant ruler.

Still, McKenzie tells the Hollywood Reporter, “He’s a complicated hero. He gets half of the way he wants to go by murdering someone in a church. He’s one of the one percent. He’s not an easy hero to go, ‘He’s our folk guy.’”

Given the drawn-out nature of the struggle for Scottish independence, the film’s condensed time frame—it focuses on Bruce’s life between 1304 and 1307—makes narrative sense. But whether this hinders Outlaw King’s ability to capture Bruce’s transformation, in the words of historian Fiona Watson—author of the newly released Traitor, Outlaw, King: The Making of Robert Bruce—from someone “incredibly inept” to someone “quite extraordinary” is another issue entirely.

***

Like many conflicts of the medieval era, the First War of Scottish Independence began with a succession crisis. After Alexander III, King of Scots, died suddenly in 1286, the throne passed to his granddaughter, three-year-old Margaret, Maid of Norway. Never officially crowned, she died unexpectedly four years later, triggering a battle for power between claimants John Balliol and Robert the Bruce, the grandfather of the better-known Robert. Trapped in a stalemate, the Scots asked England’s Edward I (played in Outlaw King by Stephen Dillane) to choose their nation’s next ruler. In 1292, he picked Balliol.

England’s intervention came with a heavy price: Edward forced the Scottish nobility to pledge fealty to him, eroding the country’s claim to sovereignty and treating Scotland much like a feudal territory. Incensed, the Scots formed a separate alliance with France in 1295 and continued their subversion of English authority with a 1296 attack on the city of Carlisle. Edward retaliated in brutal fashion. As 15th-century chronicler Walter Bower recounts, the king targeted the Scottish city of Berwick, sparing “no one, whatever the age or sex, and for two days streams of blood flowed from the bodies of the slain … so that mills could be turned round by the flow of their blood.”

During these early stages of the war, Bruce and his father Robert sided with the English. The younger Robert had recently served in the royal household, Michael Penman writes in Robert the Bruce: King of the Scots, and it’s possible he wanted to convince Edward that the Bruce clan had forgotten its ambitions of claiming the throne. Whatever his motivations, the 21-year-old Robert marched with the English against the country he would one day rule.

But in 1297, an increasingly disillusioned Bruce shifted his allegiance to Scottish rebel William Wallace. Forever cemented (erroneously) in popular imagination as a blue paint-covered kilt-wearer, Wallace is often portrayed as a more straightforward figure than his successor in the bid for Scottish independence. Michael Brown, a historian at Scotland’s University of St. Andrews, says that Wallace is remembered as “the disinterested patriotic hero whose only concern was the liberty and protection of his fellow Scots.” Comparatively, “Bruce is a successful politician. He achieves more, but in some ways his hands are dirtier.”

Braveheart famously depicts Bruce (played by Angus MacFayden) betraying Wallace during the Battle of Falkirk in 1298, then having a change of heart and rescuing the downed Scots leader from the wrath of the English. Yet there’s no historical evidence Bruce was at Falkirk, nor that he directly betrayed Wallace (although he did switch sides several times in these early years). As Brown explains, the story is mainly cited to reflect how Wallace’s failure inspired Bruce’s later success: “[There’s] the idea of Wallace standing in for Bruce in a sense, but Bruce failing to perform that [leadership] role at that stage.”

The defeat at Falkirk marked the unofficial end of Wallace’s campaign—he resigned as Guardian of Scotland and went on the run. This is where Outlaw King picks up. With the independence movement largely crushed, Bruce and most of the Scottish lords submitted to Edward’s authority.

***

John Comyn continued battling the English until February 1304, when he negotiated peace terms that restored Scotland’s “laws, usages, customs and liberties” and provided for a representative assembly. Around this time, Bruce returned to Scotland, likely with an eye toward the crown vacated by the still-exiled Balliol. Watson, author of Traitor, Outlaw, King, describes the soon-to-be king’s actions during this period as “incredibly duplicitous.” He’d pledged fealty to Edward I and England, but this didn’t stop him from forming a vague agreement of mutual support with the powerful Bishop of St. Andrews.

This tangled web of alliances culminated in that deadly February 10, 1306, meeting between Bruce and Comyn, the two main contenders for the Scottish throne. It’s uncertain what the pair actually discussed, but the near-contemporary Flores Historiarum posits that Bruce had “first secretly and then openly” begun gathering support for his claim. When asked if he’d agree to crown his rival, Comyn “firmly replied no … so [Bruce] slaughtered him.”

Watson says she is convinced Bruce arrived in Dumfries with the intention of striking down Comyn, whom he worried was on the verge of claiming the Scottish crown.

“[Bruce] was utterly consistent, utterly ruthless and utterly convinced that he should be the king of Scots,” she says, arguing that his ever-changing allegiances reflected, in his point of view, an “entirely consistent” means of achieving this singular goal.

Brown offers a more sympathetic reading that attributes the act of “unpremeditated violence” to personal antagonism between Bruce and Comyn. As he points out, Comyn’s death alienated Bruce from his victim’s powerful family, an unwise step given the coming resumption of hostilities with England. The circumstances of the murder also led Pope Clement V to excommunicate Bruce, complicating his already uncertain path forward.

In the weeks between killing Comyn and ascending to the throne, Bruce rallied support in southwest Scotland. He issued demands to Edward I, promising to “defend himself with the longest stick that he had” if they went unmet, and received absolution for his sins from the Bishop of Glasgow.

Declared a fugitive for both his sacrilege and breach of fealty, Bruce had little to lose by going one step further and seizing the crown. On March 25, 1306, he was invested with the Scottish kingship in a surprisingly elaborate ceremony held at Scone Abbey. Despite lacking the traditional coronation stone, diadem and scepter, all of which had transferred to England in 1296, Robert officially became King of Scots.

***

Some 40 years after the First War of Scottish Independence, Archbishop John Barbour composed an epic retelling of the conflict. Heavily situated in the “Bruce as hero” camp, the poem characterizes the period between Bruce’s coronation and his victory at Bannockburn in 1314 as a journey of redemption.

Comyn’s killing was “obviously homicide,” Brown explains, “but it's also blasphemy and treason. So those crimes are ones that Bruce has to expunge from his soul by his … struggles and his suffering.”

As Outlaw King attests, Bruce’s troubles started soon after he was crowned king. Edward sent Aymer de Valence, Comyn’s brother-in-law, to crush the rebellion. By early June, de Valence had captured two of Bruce’s key supporters, the bishops of St. Andrews and Glasgow, and secured the aid of Scots loyal to Comyn.

During the summer of 1306, Bruce suffered two defeats in quick succession: At the June 19 Battle of Methven, de Valence took the Scottish forces completely by surprise with an early morning sneak attack. Just under two months later, Bruce faced off with members of the MacDougall clan, an ally of the Comyns, at Dalrigh. Outnumbered and unprepared, the Scots king’s army rapidly dispersed. Bruce barely evaded capture, and over the next several months, he experienced a string of personal tragedies. Three of his four brothers fell into English hands and were hung, drawn and quartered. His wife, daughter and sisters were similarly betrayed and remained Edward’s prisoners until 1315.

At a certain point, Michael Penman writes in Robert the Bruce, it becomes difficult to trace the Scottish king’s movements. He spent the winter in hiding, perhaps on an island off the western coast, and, according to a popular but likely apocryphal tale, passed the hours by observing a spider in a cave. Disheartened by his military and personal losses, Bruce allegedly saw echoes of his struggle in the spider’s repeated attempts to swing itself from one corner to another. When the spider finally succeeded, it inspired Bruce to launch a second wave of rebellion.

Despite the spider legend’s suspect origins, Michael Brown says the story exemplifies Bruce’s reputation as a “model of perseverance.” This tenacity also forms an undercurrent of The Outlaw King, which finds its protagonist declaring himself “done with running and … sick of hiding.”

In both the film and historical record, 1307 marks a turning point in Scotland’s drive for independence. Bruce returned with a set of revamped guerrilla tactics that took advantage of the country’s rugged terrain. In doing so, he created a model of Scottish warfare that lasted long beyond his fight.

“It’s essentially run away and hide,” Brown explains. “Take to the hills, harry [the enemy’s] flanks, stop them living off of the land, but don’t risk a battle.”

Bruce’s forces secured a minor victory at the Battle of Glen Trool—really more of a skirmish—in April 1307. The following month, the Scots faced off with de Valence once again, this time at Loudoun Hill. Prior to the battle, Bruce surveyed the area and concocted a plan to restrict the movements of de Valence’s horsemen, who would otherwise overwhelm the Scottish spearmen fighting on foot. As Fiona Watson writes in Robert the Bruce, the newly confident commander ordered three trenches dug at right angles to the road, ensuring that only a limited number of cavalry would be able to reach the Scots ensconced within. The English outnumbered Bruce’s men by 3,000 to 600, according to Barbour’s poem, but were wary to ride directly into the Scottish warriors’ spears. Those who did found themselves dashed upon the ground, and as the battle drew to a close, Barbour notes that “one might hear the sound / Of shivered lances and the cry / Of wounded men in agony.”

Outlaw King concludes soon after the Battle of Loudoun Hill, content to treat this victory as a sign of the war’s changing tides (and as a proxy for the better-known Battle of Bannockburn, a 1314 meeting that saw the Scots defeat similarly superior English forces). The meeting certainly proved, in Watson’s words, that “even if Bruce had been excommunicated by the pope for the murder of John Comyn, God could still favor him.”

In reality, the fight for independence trundled on for another 21 years, concluding only with the Treaty of Edinburgh-Northampton in March 1328. By this point, Edward I was long gone—he died in July 1307, leaving his infamously inept son Edward II in control—and it was his grandson Edward III, newly ascended to the throne in place of his deposed father, who actually agreed to Bruce’s terms.

***

Bruce died on June 7, 1329, just one month shy of his 55th birthday. Although he’d only enjoyed one year of peacetime, the king went to his grave secure in the knowledge that Scotland’s sovereignty was safe—at least for the time being. Before his death, Bruce asked longtime friend James “Black” Douglas (Outlaw King’s Aaron Taylor-Johnson plays the Scottish lord with frenetic fervor) to bring his heart on a pilgrimage to the Holy Land. Unfortunately, the ever-restless Douglas stopped to support Spain’s Alfonso XI in his campaign against the Moors and was killed in battle. According to legend, he threw the casket holding Bruce’s heart ahead of him before entering the fray, declaring, “Lead on brave heart, I’ll follow thee.” Bruce’s heart was ultimately retrieved and interred at Melrose Abbey, while the rest of his body was laid to rest in the royal mausoleum at Dunfermline Abbey. The king’s epitaph, somewhat ironically, declared Bruce “the unconquered Robert, blessed king … [who] brought to freedom / the Kingdom of the Scots.”

The image of Bruce as model king and consummate defender of Scotland endures to this day, but the man behind the myth is harder to pinpoint: Whereas predecessor William Wallace is, according to Watson, “an archpatriot,” Bruce is a figure whose early years were marked by murder at the high altar, shifting loyalties and a string of military failures. It’s also worth noting that the peaceful independence Bruce fought for lasted just a few years, with hostilities starting up again in 1332 and continuing sporadically until the 1707 Act of Union brought England and Scotland together under the single entity of Great Britain. But Brown argues that Bruce’s accomplishments weren’t diminished by the Act of Union. In fact, he says, the legendary king came to be “the guarantor of Scottish liberties” within the united realm.

Watson summarizes Bruce’s legacy best, concluding in Traitor, Outlaw, King that it’s natural to suspect the warrior king’s motives.

“But,” she concludes, “we cannot deny his achievements.”