AS King Charles III settles into his new role, I wonder if he will ponder on his ancestors and how close they came to ending the dynastic succession which would have meant his royal line would have been sundered as far back as the 17th and 18th centuries.

In reverse order of chronology, here’s a few what ifs: what if Culloden had gone the other way and Butcher Cumberland had been defeated? What if in 1745 Charles Edward Stuart had marched the whole way to London and evicted the Hanoverians to take back the throne of the United Kingdom?

What if his father the Old Pretender had succeeded with his attempts at a Jacobite Rising? What if George I had decided not to come to England? What if any of Queen Anne’s children had survived to succeed her instead of dying young? What if Mary II had not had miscarriages and had lived to have a child (she was only 32 when she died of smallpox in 1694)?

What if James VII and II had renounced his Roman Catholicism and had his son, later the Old Pretender, baptised an Anglican? What if James VII’s army had won the Battle of the Boyne in 1690 and he had taken back his kingdom? What if Bonnie Dundee had survived Killiecrankie in 1689 and led the Jacobite army to glorious success?

What if General George Monck had stayed in Scotland and not brought about the Restoration of the Monarchy? What if Oliver Cromwell had been succeeded by a Lord Protector who knew what he was doing instead of his fairly useless son Richard? What if the republican Commonwealth had continued and the monarchy not been restored?

What if Charles I had accepted that there was no divine right of kings and had kept his head? What if his father James VI had decided not to become James I of England? And for the purposes of this particular column, what if James VI and I and all the Lords and MPs had been annihilated in the Gunpowder Plot?

READ MORE: The countries likely to become republics now Charles has taken over from Queen Elizabeth

Considering all these what ifs and many more, and looking at how the current Windsor dynasty came to reign over us, you have to conclude that at times they and their ancestors rode their luck and were fortunate to reign over the United Kingdom and the two kingdoms of Scotland and England before that.

Whether accident of birth is the only qualification to become a king is an argument for another time and place but today I am going to show how the start of the Union of the Crowns very nearly ended almost as soon as it started with the Gunpowder Plot of 1605.

Why the Gunpowder Plot is not seen as a major event in Scottish history never ceases to amaze me, but then we are mostly brought up to believe it was an assault on the British establishment, even though such a thing was still over a century away.

Yes, the target was the English Parliament but for some of the conspirators it was a way of ridding England of its Scottish king, and certainly in the mind of the chief protagonist it was seen as a way of dealing with the Scot he most detested. As we shall see, Guy Fawkes had an intense hatred of all things Scottish.

Last week I showed how the initially popular ascension to the English throne by James VI of Scotland had begun to turn sour, especially when James imported Scottish advisors who were soon helping themselves to English riches.

There was one sector of the population who definitely detested James, and that was the remaining rump of Roman Catholics in England who could not stomach a Scottish Presbyterian on the throne.

READ MORE: Why should Scotland accept King Charles III as the new monarch?

Not long after James came to the English throne, a group of Catholic conspirators began to plot his assassination and replacement as monarch by Dunfermline-born Princess Elizabeth, his nine-year-old daughter by his Queen Consort Anne of Denmark.

The entirely innocent child was then staying with her guardians, Lord and Lady Harrington, at Coombe Abbey in Warwickshire. As the plot to kill the king developed, the conspirators led by Robert Catesby decided that as the assassination was taking place, the princess would be seized and later placed upon the throne of England where she would be brought up a Catholic under their influence and married off to a Catholic nobleman or prince with Roman Catholicism becoming the state religion.

There were two fundamental flaws in their plan for Elizabeth, namely that Scotland would never have accepted a Catholic queen, and the intelligent and high-minded girl would not have played along. As she wrote to her brother Prince Henry some time after the Plot: “What a queen should I have been by this means? I should rather have been with my royal father in the parliament house than wear his crown on such condition.”

THE man who would become synonymous with the Gunpowder Plot was actually a later entrant into the conspiracy. Guy Fawkes, also known as Guido and John Johnson, was born a Protestant in Yorkshire in 1570 but converted to Catholicism in his youth, before going off to fight for Spain against the Dutch Republic’s reformed forces in the Eighty Years’ War.

He was a brave and able soldier, and fought in several major battles such as the Siege of Calais. It is most likely that during his service with Spain he encountered Scottish mercenaries fighting for the Dutch and perhaps it was their noted ferocity which gave him a dislike of Scots.

We don’t know exactly how his hatred came about but it was certainly deep-rooted within him and he took a particular aversion to the Scottish nobles who had come to London with their king.

When he went to Spain, then technically at war with England, in 1603 he was trying to enlist support for a Catholic uprising to get rid of the new Protestant king of England. Fawkes wrote of his detestation of Scotland and the Scots and called King James a heretic. He was also dismissive of the Union of the Crowns, writing: “It will not be possible to reconcile these two nations, as they are, for very long.”

Unbeknown to Fawkes, King Philip II of Spain was already dealing in secret with King James, and indeed the following year a peace treaty was signed by the two monarchs. Philip declined to support Fawkes who returned to England and was introduced by his friend Thomas Wintour to Catesby who already had a small group of fellow Catholics from the Provinces working together.

The core team of plotters was now in place, led by Fawkes, Catesby, Wintour, John Wright, and Thomas Percy who had actually been a go-between for the Scottish and English courtiers who arranged the succession of King James.

They began to plan for their audacious coup in which the King, his son and heir Prince Henry, and the entire Lords and Commons would be blown to smithereens at the state opening of Parliament in the summer of 1605.

THE conspirators got a lucky break when they were able to lease an undercroft of the House of Lords which they promptly filled with at least 36 barrels of gunpowder – enough, as King James himself suggested, to blow up not only the house and everything in it but also kill 30,000 people in the surrounding city.

The opening in late July was postponed when plague broke out in London, and there has been some suggestion that the delay until November 5 meant that the gunpowder would have deteriorated. Not true – with his experience as a soldier Fawkes knew that the gunpowder needed to be refreshed and he put in many more barrels as well as seizing for himself the role of lighting the match to trigger the explosion.

READ MORE: King Charles recites Robert Burns during special gathering at Holyrood

It’s not certain how the information about the plot leaked, but Lord Monteagle, a friend of one of the plotters, received a letter warning him to avoid the opening of Parliament.

He passed this on to Robert Cecil, who contacted King James. Having had a hint of the plot, the ever-paranoid King ordered not one but two searches of the entire premises and during the second Fawkes was found at the scene.

The first interrogation was carried out by members of the Privy Council and one Scottish Lord asked Fawkes why he had so much gunpowder. It was then that the conspirator made the remark which proved that his hatred was as much inspired by distaste for the Scots as by his Catholic ire. He said that he wanted “to blow you Scotch beggars back to your native mountains.”

With a hue and cry raised, the other conspirators had fled back to the Midlands and Percy and Catesby were killed by forces under the Sheriff of Worcester – they were hit by the same musket ball. Fawkes and eight other conspirators were tried and sentenced to be hanged, drawn and quartered, but on the huge scaffold on January 31, 1606, Fawkes either fell or jumped to his death, breaking his neck. He was still quartered and beheaded, as were all the conspirators including the dead Percy and Catesby.

The greatest threat to the Union of the Crowns under James’s personal union had been eliminated, but the Gunpowder Plot had shown James that some of his subjects were quite able to contemplate killing him and while he authorised a much firmer crackdown on Catholics generally – an act was passed compelling Catholics to take an oath of allegiance – and the Jesuit order in particular, he did tell Parliament that it had only been a small minority of Catholics who were to blame and that the vast majority of English Catholics supported their king.

People in Scotland and England generally rejoiced that James and the royal family had survived the plot and bonfires of celebration were lit, leading both Parliaments to decree November 5 as a day to mark the salvation of the King. The custom of burning an effigy of Guy Fawkes on the bonfires originated some time later, and is said to have begun in Scotland where effigies of the Pope were the original burned goods.

Religion would continue to be a problem for James, with even his Scottish kingdom, by now enjoying a long period of peace and economic growth through trade with England, upset by his insistence that there should be bishops in the Church of Scotland. He continued to be a patron of the arts and is said to have enjoyed his conversations with William Shakespeare and others, but it was for two undertakings which were the direct consequences of the Union of the Crowns that he is now best remembered.

One was the Plantation of Ulster which began in 1606 and which saw Protestants from England and Scotland given land and encouragement to settle in Ireland’s northern province in a blatant attempt to supplant the Catholic people with Protestant stock. James achieved his aim, but the results of that are reverberating to this day.

The other project was dear to the heart of King James and in England he had the means to achieve it. In 1604 he commissioned several dozen English theologians and scholars to start an English translation of the Holy Bible. It took seven years to complete and from publication onwards it was a huge success, transforming the way Christianity was observed.

With his many foibles, James VI and I became known as “the wisest fool in Christendom”, but he undoubtedly changed the course of history, and his personal Union of the Crowns would last for decades after his death on March 27, 1625.