BY THE time the early evening news is broadcast tonight, the Queen will have completed her trip by steam train down the Waverley line, an appropriate way for her to mark becoming the longest serving monarch in British history by overtaking her great-great grandmother, Victoria.

She came to the throne 63 years, seven months and two days ago, or to put it in political terms, 12 Prime Ministers ago. To phrase it in the cricket parlance of our southern neighbours who see her as Queen Elizabeth II, it has been quite an innings. And in Scotland, where our monarchist former First Minister Alex Salmond was fond of referring to her as Queen of Scots and some still insist on styling her Elizabeth I, her enduring popularity is at odds with the notional nation of Red Clydesiders and Fife republicans.

There is a paradox at the heart of her achievement in having, in her ninetieth year and against many odds, cemented the position of the British monarchy in the 21st century.

She has undoubtedly benefited from the current climate of “anti-politics” in which, ever since the MPs’ expenses scandal and the lies that took the UK to war in Iraq. For if we loath politicians, why would we want another one as head of state?

But the irony is that the Queen is in her quiet, steely way a consummate politician. In an age when deference has been transferred to pop stars, soap actors and reality television performers, we might have expected the institution of the monarchy to enter a period of decline or even a fight for its very survival. But the Queen is on Twitter. She is advised — and appears to know when to take and when to reject such — by courtiers who understand the modern age.

Eleven years of being briefed by Prime Minister Thatcher left her unbruised,

ten years with Tony Blair left her undazzled. Relations with First Minister Sturgeon may be less than warm in the carriage to Galashiels today, but there will probably be an underlying honesty and possibly even respect.

The young Elizabeth came to the throne at a difficult time for the monarchy and she had later traumas, most notably the killing of Lord Mountbatten in 1979, her annus horribilis of 1992 and Princess Diana’s death five years later.

But the association with premiers from Churchill to Cameron have also given her a unique insight into the heart of our Westminster system. By repute — depending on courtiers for your PR means just that — the Queen is very well briefed on domestic and world affairs, a brilliant mimic, and a sharp interrogator, all things which are useful in a head of state.

But, and there is always a but, can the notion of a hereditary head of state long survive her eventual passing? Only a fool would predict in a changing world. Some will favour the retention of the monarchy as a matter of faith, others as the least bad solution in an age of bent politicians. But will Charles prove too odd? Or William too anodyne? History will tell.