Born in 1274 in Ayr, the son of Robert Bruce, Earl of Carrick, he was the grandson of the Robert Bruce who had been one of the competitors for the throne after the death of the Maid of Norway.
Robert I had been on the English side when Edward moved against Balliol, but he had subsequently joined Wallace's revolt. When Wallace gave up the Guardianship of Scotland in 1298, Robert became joint Guardian with Sir John Comyn of Badenoch (Balliol's nephew).
A few weeks before his coronation, Robert killed his greatest rival for the crown - his joint Guardian - in a Dumfries church, during the last of many arguments between them. For this murder, Robert was outlawed by Edward I and excommunicated by Pope Clement V.
His reign did not begin well. He was defeated by the English at Methven in Perthshire; his wife, daughter and sisters were imprisoned; and three of his brothers were executed by the English. Robert fled westward to the Antrim coast. (The story of Robert drawing inspiration from a persistent spider mending its web in a cave dates from the sixteenth century.)
However, he possessed real military genius and he was helped by the fact that in 1307 Edward I, the self-styled 'Hammer of the Scots', died and was succeeded by his less effective son Edward II.
From 1307 onwards, with energy and determination, Robert waged highly successful guerrilla warfare against the English occupiers, establishing control north of the Forth, and gradually won back his kingdom; by 1314, Stirling was the only castle in English hands.
His campaign culminated in resounding victory over Edward II (whose larger army of 20,000 outnumbered Robert's forces by three to one) at the Battle of Bannockburn, near Stirling on 24 June 1314. Bannockburn confirmed the re-establishment of an independent Scottish monarchy.
Two years later, his brother and heir presumptive, Edward Bruce, was inaugurated as High King of Ireland (which increased pressure on the English), but was killed in battle in 1318.
Even after Bannockburn and the Scottish capture of Berwick in 1318, Edward II refused to give up his claim to the overlordship of Scotland, and so in 1320 the Scottish earls, barons and the 'community of the realm' sent a letter to Pope John XXII declaring that Robert I was their rightful monarch. This 'Declaration of Arbroath' has become perhaps the most famous document in Scottish history.
The Declaration asserted the antiquity of the Scottish people and their monarchy:
"...we gather from the deeds and books of the ancients, that among other distinguished nations our own nation, namely of Scots, has been marked by many distinctions.
"It journeyed from Greater Scythia by the Tyrrenhian Sea and the Pillars of Hercules, and dwelt for a long span of time in Spain among the most savage peoples, but nowhere could it be subjugated by any people, however barbarous. From there it came, twelve hundred years after the people of Israel crossed the Red Sea and, having first driven out the Britons and altogether destroyed the Picts, it acquired, with many victories and untold efforts, the places which it now holds ...
"As the histories of old time bear witness, it has held them free of all servitude ever since. In their kingdom one hundred and thirteen kings of their own royal stock have reigned, the line unbroken by a single foreigner.'
The Declaration also had a stark warning for Robert:
"were he to desist from what he has undertaken and be willing to subject us or our kingdom to the king of the English or the English, we would strive to expel him forthwith as our enemy and as a subverter of right, his own and ours, and make someone else our king who is equal to the task of defending us."
In 1324, the Pope recognised Robert as king of an independent Scotland. Two years later, the Franco-Scottish alliance was renewed in the Treaty of Corbeil, by which the Scots were obliged to make war on England should hostilities break out between England and France.
In 1327, the English deposed Edward II in favour of his son Edward III and peace was then made between Scotland and England with the treaty of Edinburgh-Northampton, which began with England's total renunciation of all claims to superiority over Scotland. Robert had achieved all he had fought for: ejecting the English, re-establishing peace and gaining recognition as the true king.
By that time, King Robert was seriously ill, probably with leprosy, and he died at Cardross, Dunbartonshire on 7 June 1329, aged 54. A few days later, in response to an earlier request by him, the Pope granted permission for kings of Scots to be anointed at their coronation (Scottish kings had previously been enthroned in a mainly secular ceremony at Scone). This was a clear acknowledgement that the Pope recognised Scotland's independence.
Robert I was buried at Dunfermline and, in fulfilment of his dying wish, Sir James Douglas set out to carry his heart to the Holy Land.
Sir James was killed fighting the Moors in Granada, in Spain, but the heart was retrieved and brought back to Scotland, to be buried in Melrose Abbey, Roxburghshire.