IT'S Ibrox on a Saturday afternoon and another Old Firm clash is under way. We all know the scene. Union Jacks are waved, covered in protestations of loyalty to a Protestant British monarch, either living or long dead. A few wear orange out of "respect" to their former Dutch players, some England tops to mark out their commitment to Britain Out on the field controversy erupts. A fair challenge? The referee settles on a late penalty. Is it a sinister plot? The crowd, split along partisan lines, detonates. Enthusiasts on both sides exchange insults that reach back centuries: dark passions that will later spill out onto the streets.

The Old Firm derby provides a glimpse into the psychology of the popular religious tensions of the late 17th and early 18th-centuries; the period in which the union was formed. The historic Rangers-Celtic clash reminds us that the factors that motivated the union were not only economics, bribery or empire. The union was also about religion.

At the time there was little differentiation between religion and politics, especially in periods of political tension when rumours of plots - real or imagined - aimed at the overthrow of Protestantism, the monarchy, or both, were rife. In Scotland, the near sectarian nature of politics was reflected in the country's nascent party divisions.

On the one side were the Whigs, primarily Presbyterian Protestants from south of the Tay. They were nicknamed after radical Presbyterians from the southwest who had once briefly seized control of Scotland in the Whiggamore Raid of 1648. By 1707, this camp was generally pro-Union.

On the other side were the Jacobites, mainly Episcopalian Protestants or Catholics, who their drew strength from the opposite bank of the Tay. The Jacobites were essentially fans of the Scottish royal house of Stuart and were so called because they supported the Catholic King James VII and his heirs after their deposition in 1688. By 1707, this camp was generally anti-union.

Both camps' religions defined their politics. The Episcopalians believed in the "natural" pyramid of society ordained by God with parliaments never above the power of the king. For them, the government of the church should come from the top down, from the king, through his bishops, and down into the local parish. In that respect they were akin to Catholics, expect the Catholic church was headed by the pope.

However, the Presbyterians believed that the king's powers should be limited by the laws of parliament and God. They believed that no king but Christ should rule the church, that its local ministers should be subject to the approval of local elders and that the ruling body of the church should be a general assembly of both.

Both sides could be described as armed gangs with deep local roots, ready to resort to rebellion if the king showed too much favour to one faction over another. But usually they adhered to the rules of the game and met in the Scottish parliament. For them, the union was just one more derby in a long-running rivalry that would only end in the bloody chaos of Culloden Moor in 1746 and the destruction of Highland society.

But the union was nevertheless an important derby - and it was one that the Episcopalian and Catholic Jacobites lost. The Whig Presbyterians were the stronger faction in the undemocratic Scottish parliament and their victory cemented a permanent Whig Presbyterian advantage into the bricks and mortar of a new British constitution.

The fact that the Whigs defined this new union, rather than the Jacobites, led Britain to have a more exclusively Protestant identity than might have been achieved under the Stuart kings, and one which excluded Catholic Ireland, rather than including it.

So how did they do it? To secure the passage of the Union Treaty in 1707, an act was passed alongside the treaty that confirmed that the Scottish church would remain Presbyterian for all time under the new British settlement. It was a settlement which completely ignored the fact that more than half the Scottish population then lived north of the Tay and were Episcopalian or Catholic in outlook.

The treaty itself took another step. Article II proclaimed that the succession to the monarchy of the new United Kingdom of Great Britain after the death of the incumbent Queen Anne would be the Protestant German princess, Sophia, Electress of Hanover. Or her Hanoverian heirs, as long as they were Protestants.

That meant ditching the ancient Scottish line of Stuart kings for ever, as they were Catholics. This was completely unacceptable to the Jacobites and led to their attempted risings in 1708, 1715, 1719 and, of course, Bonnie Prince Charlie and the '45.

But why insist on a Protestant monarchy? Well, as far as the English were concerned, Article II was non-negotiable. A Stuart restorationinScotland, whichtheScotshad seemed to consider in 1703-4, would open the door for the Stuarts' acquisitive ally, Louis XIV of France, to attack England. But if the English did not want the Stuarts back, neither did Scotland's Presbyterian Whigs.

ToworkoutwhyScottish Presbyteriansdisliked their own royal family so much, we have to look at the 17th century in more detail.Exploring its religious complexity is vital to understanding why the union happened - and stayed together. For this period revealswhyScottishWhigsformedan alliance with powerful forces in England to casttheJacobitesasideandmakea PresbyterianScotlandundera Protestant monarch the cornerstone of the union.ScottishPresbyterianantipathy towards their nation's ancient monarchs drew on their memories of the last two Stuart kings, Charles II (1660-85) and his brother James VII (1685-88). Charles II has been mythologised as the Merry Monarch, but to many contemporary Scots Presbyterians he was a persecuting tyrant. From the mid-1670s his regime in Scotland had fined and imprisoned Presbyterians in the south of Scotland who failed to conform to theEpiscopal church by attendingillegal Presbyterian field preachings on the moors.

Seditious Presbyterian ministers were hunted down by government forces and sent to the Bass Rock in the Firth of Forth, the Guantanamo Bay of its day, and Episcopalian and Catholic Highlanders were quartered on local landowners who were suspected of Presbyterian sympathies.

It was a powder-keg situation, which duly exploded in 1679 when militant Presbyterians assassinated one of their chief persecutors, the Episcopalian Archbishop of St Andrews, James Sharp, by dragging him from his carriage and dirking him to death. Soon ordinary Presbyterians across the south and west were emboldened to take up arms and they seized Glasgow.

But this "revolution from below" was not on the agenda of the Whig Presbyterian leaders. For two weeks they attempted to curb the militants' demands until Charles II sent in soldiers, mainly drafted in from England, to smash the Presbyterian "people's army" at the battle of Bothwell Brig.

For the next five years, militants behind the uprising were hunted and harried in what became known as the Killing Times. Some were executed on the scaffold in Edinburgh and Glasgow, others banished to the sugar plantations of Barbados, shot in the fields, or in the case of two women in Wigtown, tied to stakes and drowned by the incoming tide.

Initially the Whig leaders had condemned the militants as fanatics. But soon they, too, were drawn into open opposition to the Stuarts after Charles II's Catholic brother James succeeded him. The Whigs had had enough: they wanted a Protestant in charge who was sympathetic to Presbyterianism.

At this point many of the Presbyterian Whigs behind the Union, the original parcel o' rogues, were drawn together with English Whigs- Protestant dissenters who also wanted to limit the power of the monarchyandwerevirulentlyanti-Catholic and anti-French - in a series of treasonable insurrectionaryplots, including the proposed assassinations of both Charles II and James.

These treasonous men included the Earl of Argyll, whose son would be pivotal in the passing of the union in Scotland. When James succeeded his brother in 1685, the Whig plotters led by Argyll attempted an invasion of Scotland. But they found little public support. Argyll was quickly captured near Paisley and executed by the Maiden, the Scottish guillotine, and his head put on a spike on Edinburgh's Tolbooth.

Yet James didn't need a plot to remove him. He did that all by himself. His raft of pro-Catholic and pro-French policies and the unexpected birth of his son, James, which would continue the line of Catholic Stuart kings, left him dangerously short of committed supporters. The crisis came in 1688 over an impending war between Louis XIV and William of Orange, the Protestant leader of the Dutch Republic. James's army deserted him at the crucial hour when William and 15,000 heavily-armed Dutchmen invaded England in a preemptive strike to remove James and stop him aiding Louis XIV's attack on the Dutch. Deserted on all sides the hapless James fled into exile in France.

William's timing was impeccable. He arrived on November 5, then a popular sectarianfestivalwhencrowdsburnt the Catholic plotter Guy Fawkes in effigy to reaffirm their Protestant identity.

As the leader of a republic, William was more prepared to accept limitations on the powers of his kingship and was quickly declared king. He also brought the Whigs into power in Scotland and they quickly establishedaPresbyterianstate church and strengthened the powers of the Scottish parliament.

Initially, the removal of the Stuart king was popular. But not for long. Cue the Massacre of Glencoe, the orders for which were signed by William. Then the accursed Seven Ill Years, in which famine wiped out 20% of the population. Top it all off with the debacle of the Darien scheme, when William blocked English and Dutch moneymen from doing vital business with Scottish colonists, resulting in the venture's collapse. All of this brought a resurgence in Jacobite popularity.

Now, faced with the prospect of a Jacobite restoration, understandably many Whigs were ready to agree to the union and its permanent exclusion of the Catholic Stuarts from the throne. After all, some of these Whigs had been serial traitors against the Jacobite James VIII's father and brother. Accepting the union was worth it in order to prevent the return of the Stuarts - even if that meant the abolition of Scotland's parliament.

The union allowed Presbyterian Scots to walk confidently into Britain. Within its empire they carved a niche for their Presbyterian vision of liberties bounded by the law. In the Scottish Enlightenment figures with a Presbyterian background such as Adam Smith sought to reshape the world by appealing to our better natures to create a wealthier and more moral society, Presbyterian Scots exported their vision to America where they helped to found the United States, and later missionaries such as David Livingstone could appeal to a sense of justice to fight the slave trade in Africa. At home too, others, such as Robert Burns, sought to extend our liberties. His unquenchable desire for liberty, expressed in A Man's A Man, or his sympathy for suffering in To A Mouse, so eloquently pointed to our failings at home.

But the circumstances of Britain's creation meant that it was also an expressly anti-Catholic and anti-French entity from its inception. For the others, Jacobite Episcopalians and Catholics, the process of integration took far longer, and in the case of the latter was perhaps never fully resolved.

MOSTremaining Jacobiteswere drawn in after the defeat at Culloden bytheobvious advantages of the BritishEmpire. Within a generation theywouldbefightingtokeepother Britons, this time in North America, from leaving the empire.

But popular anti-Catholicism was, and remains, the dark side of unionism in Scotland. When the British empire needed more manpower to fight the French in the global wars of the late 18th century, moves were made to emancipate Catholics from penal laws which proscribed their participation in the British state. In Scotland these provoked "No Popery" Riots and prompted Protestant mobs in Edinburgh to attack the handful of Catholics in their midst.

After another union, with Ireland in 1801, large scale immigration of Irish Catholics and Protestants into industrial Scotland brought new sectarian conflicts. While the Protestants, a quarter of the immigrants, quickly mergedintothelocalpopulation,the Catholics were viewed as a threat to Scotland's Protestant and unionist inheritance. In times of economic tension, such as the 1930s, old fears came to the fore. The Kirk worried about Scotland being "polluted" by the Catholic Irish "race", while mobs whipped up by demagogues such as Klu Klux Klan sympathiser John Cormack stoned Catholic school children in Edinburgh. The second world war brought such ideas into disrepute and led to the Presbyterian Kirk abandoning open anti-Catholicism. What, after all, had they fought the Nazis for?

With the decline of organised religion, most Scots now look on in bewilderment at the remaining sectarianproblem. It remains a clash between British and Irish identities - just look at the flags at any Old Firm derby - but most of the structuresandforcesthat createditintheyears immediately before and after 1707arelonggone. With one exception: an exclusively Protestantmonarchy, enshrined in the Act of Union itself. Whatever the reasonsforsectarianism's lingering presence, thatisone uniondividendwe could perhaps do without.