TODAY is the 550th anniversary of Scotland’s northern boundaries being finalised after centuries of war and dispute, and it was all down to a king who couldn’t pay his debts.

On February 20, 1472, an Act of the Scottish Parliament formally annexed Orkney and Shetland as the territory of Scotland under King James III.

In prehistoric times, the two archipelagos had been settled by people from the Scottish mainland, and especially on Orkney, they left their indelible mark in the form of settlements and tombs such as Skara Brae and Maeshow. Archaeological finds have confirmed that they used the same tools as found on the mainland.

It is thought that possession of Orkney and Shetland was fought over by Scottish nobles until the 8th and 9th centuries when an all-conquering force arrived – the Vikings.

They were Norsemen, almost all hailing from Norway, and they must have liked Orkney and Shetland because they came, they saw, they conquered and they stayed – unusually for a people whose lives and culture were based on raiding foreign places and taking home the booty. Instead they settled on numerous islands, brought over their women and started families – we do not know how many, but there is plenty of evidence of their transition to a farming-based community.

The Norse occupants did not give up their Viking pursuits, as a remarkable 13th-century book called Orkneying Saga shows. Though often loose with the truth, the Saga does tell the story of how the Norse Jarls, equivalent to an earl, ruled over Orkney and Shetland for several centuries and raided the Hebrides and the mainland of Scotland. They first of all fought the Picts in the northern parts of Scotland and then the Kingdom of Alba which united Picts and Scots in the 9th century.

The earliest reference to the Earldom of Orkney is in an Irish account of the Battle of Clontarf in 1014 when the Norse raiders led by Earl Sigurd Hlordvirsson were driven away by the Irish forces. As both Norway and Scotland disputed overlordship of the islands, the Orkney earls grew in power and by the 13th century there was little doubt that both Orkney and Shetland were effectively Norse in character. That changed in the late-1300s and 1400s when Orkney in particular became more Scottish, as shown by the fact that Henry Sinclair was both Lord of Roslin – his grandson would build the famous chapel there – and Earl of Orkney at the turn of the 15th century.

After Norway was peaceably united with Denmark under King Christian I – his Oldenburg dynasty is still on the Danish throne – in 1450, he concentrated on building his empire in Scandinavia and seems to have had little time for his westernmost provinces of Orkney and Shetland. Christian also did not want any further warring with the Scots, and in 1468 a dynastic marriage was arranged between his 12-year-old daughter Margaret and James III – who had been on the throne since 1460 but who was still only 16 or 17. They married at Holyrood Abbey in 1469, a year after the signing of the Treaty of Copenhagen – sealing the friendship between Denmark/Norway and Scotland.

By that treaty, Margaret of Denmark’s dowry included the cancellation of debts allegedly owed by Scotland but most importantly King Christian offered 60,000 guilders or Rhenish Florins to James, with a mortgage secured on Orkney and Shetland. The first payment was due immediately after the marriage, but Christian was short of currency and the payment was not made. It seems he really did want shot of the islands ordered his subjects there to pay their taxes to the King of Scots until he could pay the redemption money. He never did pay up and effectively handed over the islands to Scotland.

James III also made it clear that he wanted the islands, and in 1470 he "persuaded" the Earl of Orkney, William Sinclair, to sign over his earldom to the king himself in return for some lands in Fife that included Ravenscraig Castle.

Now as Earl of Orkney – King Christian did not object – all that remained for James to do was to get the Scottish Parliament to formalise the annexation which happened 550 years ago today.

A superb blog on the Shetland Museum and Archives website described what happened next: “[James] promised that they shouldn’t be given away in time to come to anyone, except one of the king’s legitimate sons. His plan was that the islands should be governed by the Scottish crown, and administered on the king’s behalf by his own governors and tax-collectors – while leaving open the possibility that they might be gifted to a respectable nobleman sometime in the future. So in August the same year James appointed the bishop of Orkney, Andrew Pictoris, as his agent in Orkney and Shetland. King Christian didn’t complain.

“And something else happened, again in 1472, that was equally far-reaching. Six months after the annexation Pope Sixtus VI created an archbishopric in Scotland, based at St Andrews. He attached the bishopric of Orkney to it. At a stroke the ecclesiastical affairs of Orkney and Shetland had been taken over by the church in Scotland, just as their royal administration had been.”

Many nobles in Denmark and Norway were upset at King Christian for letting Orkney and Shetland go, and his successors King Hans and King Christian II were put under pressure to renounce the Treaty and take possession of the islands once again. They found excuses not to do so with Christian II being particularly hypocritical as he wrote to the islanders in 1514 that they were rightly under the crown of Norway despite being “pawned” to Scotland. It wasn’t until the 1660s that Denmark stopped claiming the islands.

For many decades Orkney and Shetland kept their own distinctly Norse polity, but the islands have been part of Scotland since this date in 1472.