TWENTY-ONE days after her coronation in Westminster Abbey, the Queen made her state entry into Scotland on June 23, 1953. It was a baptism of fire. The controversy over her new title of Queen Elizabeth II sparked an unforeseen anger among Scots that their history was being blatantly re-written since Scotland had never previously had a Queen Elizabeth. There was public protest, unprecedented criticism of royalty and new Royal Mail post boxes bearing the initials EIIR were blown up. As a result, post boxes in Scotland now bear only a crown and the initials ER.

The newly-crowned young Queen was presented with the Honours of Scotland in St Giles Cathedral at a ceremony that should have been full of pomp and dignity. Instead she offended Scottish sensibilities by not wearing formal robes and carrying an obtrusive handbag, presumably ill-advised by someone who had misread the mood of the people.

Yet on the eve of her departure, 100,000 people gathered on Arthur's Seat in Holyrood Park at midnight to bid her farewell and broke into: "Will ye no come back again?"

Those strands of loyalty and suspicion and unashamed hostility have twisted their way down more than half a century to reach a critical approval, turning into grudging affection. Constancy, commitment and a willingness to learn tend to win favour in a country where respect is particularly cherished when it is hard-earned.

The tough lessons started early. In October 1953 the Scottish Covenant Association petitioned the Court of Session to have the title Elizabeth II legally banned in Scotland, arguing that it was a contradiction of fact and a breach of the Act of Union of 1707, since Elizabeth of England had never reigned over Scotland.

It was dismissed as "incompetent in law, irrelevant and indeed extravagant". Nevertheless, the lord president, Lord Cooper, ruled that: "The principle of the unlimited sovereignty of parliament is a distinctively English principle which has no counterpart in Scottish constitutional law."

The Queen's postcoronation visit to the northern part of the kingdom followed a pattern set by Sir Walter Scott in 1822, when he orchestrated a visit by George IV, the first to Scotland of a reigning monarch since 1650. The royal males have paraded tartanry in Scotland ever since and those who would form part of the wider royal circle have tended to dress up to match. As a child on her summer holidays, Scotland must have seemed a bizarre land of stocking-clad male legs to the young Princess Elizabeth.

Extraordinarily, much of the pageantry surrounding George's visit is re-enacted every July with the Queen's sojourn at the Palace of Holyroodhouse. Yet it was Willie Hamilton, MP for a Scottish constituency (Central Fife) , who first and fearlessly publicly articulated a growing unrest at the cost to the taxpayer of a luxurious royal lifestyle. In essence, he did the Queen a favour, planting the previously unthinkable idea of reform of the House of Windsor before the behaviour of the next generation provided ammunition to his cause.

There were other signs that the age of unquestioning deference was ending with the imploding of social order in the 1960s and an explosion of education in the 1970s. It took unforeseen physical shape in Scotland in 1972 when the Queen arrived to open a new building at the University of Stirling. Students, angry about the cost of the visit while their facilities were unfinished, staged a protest in which the Queen was jostled amid "noisy chanting and obscene singing by more than 100 students" according to a report in The Herald. An attempt at rapprochement underlined the gulf between monarch and students. She told a group who explained the protest was not personal: "Well I hope you are enjoying yourselves, anyway."

She is said to retain a particular affection for Scotland, partly because for much of her time at Balmoral she is off-duty. The other strong strand in this fondness comes from her mother's pride in her Scottish roots at Glamis cemented by the peace she found at the Castle of Mey in Caithness which proved a haven after the death of her husband George VI in 1952. That became a regular stopping-off point for the Queen and her family on their summer cruise to Aberdeen en route to Balmoral.

She launched Britannia on April 16, 1953 at John Brown's yard in Clydebank, between acceding to the throne and the coronation. After declaring: "I name this ship Britannia, " the rest of her speech was drowned out by the cheers of the 30,000 strong crowd.

Since then, she has seen more of Scotland than anyone who actually lives here: planting countless trees, opening housing developments, visiting factories, inspecting guards of honour, exchanging pleasantries with half a century's worth of lord provosts and lord lieutenants, and attending - the first British monarch to do so - the General Assembly of the Church of Scotland. She has declared open a variety of feats of engineering from the Clyde tunnel to the road bridges across the Forth and the Tay and the Falkirk Wheel, presided over the Commonwealth Games in Edinburgh and too many Braemar Gatherings to count. She was at the inaugural Edinburgh Military Tattoo in 1950 and returned in 2002 during her Golden Jubilee tour and was present to give the royal seal of approval to Glasgow taking over the baton of European City of Culture in 1990.

Of a generation forwhom duty is a meaningful concept, she has taken particularly seriously the idea that she is part of the glue which keeps the country united: "I cannot forget that I was crowned Queen of the United Kingdom of Great Britain and Northern Ireland, " she said in her Silver Jubilee speech in 1977 at the time when the campaign for Scottish devolution was at its most passionate.

Yet Scotland has not always been a jolly escape from London life. It took nearly five years after the Lockerbie bombing in 1988 for the Queen and Duke of Edinburgh to visit the town - to a very muted reception - in the summer of 1993. The Duke's attempts at jollity did not go down well and the Queen was visibly shocked when one of the bereaved relatives scraped the ground and said his family's ashes were there, but their bodies had never been recovered.

After the Dunblane tragedy in 1996 she made a particular point of visiting just days laterwith Princess Anne and having a private meeting with the bereaved parents and the injured children who were in hospital.

Sudden premature death became personal during the annual holiday at Balmoral in 1997, when the royal family learned of Diana's death in a car crash in Paris. Their decision to stay put in their Aberdeenshire fastness making it a cocoon for the princess's grieving young sons was incomprehensible to a distressed British public, who wanted their loss acknowledged publicly by the monarch - and in London - where the floral tributes were piling up to an unprecedented degree, as was the anger at what was seen to be an uncaring royal response.

In Scotland change was taking a political form and by the time the Queen came to open the first session of the reconvened Scottish Parliament in 1999, there was a new understanding between the monarch of the United Kingdom and a newlydevolved Scotland. The then presiding officer, Sir David Steel, gave a diplomatically-worded welcome: "It is good that today we, the elected representatives of the Scottish people, are able to greet Your Majesty, not only as Queen of the United Kingdom but seated as you are among us, in the historic and constitutionally correct manner with warmth and affection as Queen of Scots."

In recent years, she has begun to refer, smilingly, to aspects of the Scottish character she finds refreshing. These include humour, friendliness, forthrightness and above all the strong sense of identity. Even her republican subjects could find a shift in the balance of respect here.

Her Golden Jubilee tour of Scotland in 2002 brought another address to the parliament, this time meeting in Aberdeen while the General Assembly met in the Parliament's transitionary home on the Mound. She also addressed the assembly, with a suitably drily-couched compliment. "If some of my predecessors have had their differences with the Church, others have held it in high regard. I think especially of my greatgreat-grandmother, Queen Victoria, who was devoted to the Kirk, not least because of its straightforward practical Christianity."

By the time it came to the official opening of the Scottish Parliament's new Holyrood home in October 2004, the cost the building and the delays in its completion and the deaths of its progenitors, Donald Dewar, the original first minister, and Enric Miralles, the visionary architect, made the occasion much less of a giddy whirl, but there was a new sense of familiarity between queen and parliament. The presiding officer on that occasion, George Reid, a Scottish Nationalist by party affiliation, discarded for his office, referred to her as "Queen of Scotland". Some of the prickles of the thistle and the little white rose have been grasped and found to be less fierce than they look. In 2005 she attended Prince William's graduation at St Andrews alongside the families of other graduates, more proud grandmother than presiding sovereign.

She once said that she couldn't retire and there can be no doubt that when in a broadcast to the Empire to mark her 21st birthday in 1947, she said: "I declare before you all that my whole life, whether it be long or short, shall be devoted to your service, " she meant it literally, still means it and plans to carry out her duties until incapable, which in her case almost certainly means dead.

All the signs are that will be a decade or two away and there will be many visits to Scotland yet, not least her chosen birthday celebration of a cruise round the Western Isles aboard the Hebridean Princess. Often the places you choose to spend your holidays are closest to your heart. She'll never say, of course, but that's a fairly Scottish, as well as a queenly, characteristic.