James III lived from 10 July 1451 to 11 June 1488 and was King of Scotland from 3 August 1460 until 11 June 1488. James was the eldest son of James II and at the time of his father's accidental death from an exploding cannon at Roxburgh castle he was just 9 years old. His coronation took place at Kelso Abbey on 10 August 1460. The wider picture in Scotland at the time is set out in our Historical Timeline.
James' mother, Mary de Gueldres, acted as his Regent during the early years of his reign, though after her death in 1463 James, like his father before him, found himself the focus of rival factions of Scottish nobles seeking to gain power for themselves.
In 1468 James took the reins of power for himself. And in July that year he made his most enduring contribution to today's Scotland. He married Margaret of Denmark at Holyrood Abbey. She was the daughter of King Kristian I of Norway, Denmark and Sweden. Her dowry was 60,000 Guilders. The first 10,000 was payable in cash, and the remainder was mortgaged against Orkney. In the event, the King could only find 2,000 Guilders immediately, so the missing 8,000 was mortgaged against Shetland. In the background King James III did a deal with the Sinclair family of Roslin,who were hereditary Earls of Orkney, swapping their estates in Orkney for lands around Ravenscraig Castle, in Fife.
By 1472 the money owed by King Kristian had still not been paid, so the Scottish Parliament passed an Act annexing both Orkney and Shetland to Scotland. Neither the Danes nor the Norwegians accepted the annexation for centuries afterwards, but it was arguably legal and there was very little in practice they could do about it.
In most of the 1470s James neglected issues of politics and economy, preferring instead to focus on his support for the arts and his efforts to form alliances with England involving insanely ambitious invasion and occupation of various parts of continental Europe that never came to anything. One result was the perception he was embezzling the kingdom's funds for his personal benefit and handing out honours and lands to assorted favourite hangers-on. Meanwhile poverty and inflation were rampant. James sought to mint his way out of trouble by forging coins bearing an effigy of himself. These did nothing to help the economy, but did help focus disaffection with his personal rule.
In 1482 the English invaded Scotland yet again, taking Berwick-upon-Tweed for the final time as they did so. The English were in Scotland to support the claim of James' brother, "Alexander IV" the Duke of Albany to the crown of Scotland in line with a deal he had struck with Edward IV of England. Key command positions in the Scottish army had been given by James to his cronies and at Lauder in July 1482 the Scottish nobles rebelled. They killed many of his cronies and imprisoned James in Edinburgh Castle. The English army took Edinburgh, but were not equipped to besiege the castle, so withdrew.
King James III was released and apparently reconciled with his brother Alexander not long afterwards. In July 1486 Queen Margaret died at Stirling Castle, and rumours spread across Scotland that their unpopular King had poisoned their very popular Queen. They were probably unfounded, but had an effect nonetheless. By June 1488, Scotland's nobles were again in open revolt against James: now, though still only 36 years old, living an increasingly isolated life at Stirling Castle. And this time they had the support of James' 15 year old son, the future James IV.
On 15 June 1488 James III emerged from Stirling Castle to do battle with his nobles at the Battle of Sauchieburn, on pretty much the same site as the Battle of Bannockburn. James III is said to have entered the battle carrying the sword of Robert the Bruce. The larger army of the nobles prevailed and James was forced to flee, falling from his horse as he did so. He was given shelter by a miller and his wife, but while recovering was killed in circumstances that remain very unclear. James was buried at the nearby Cambuskenneth Abbey and his grave is still marked by a large tomb.