When the prime minister suddenly and unexpectedly resigned, Simon Hoggart wrote in his sketch on the front page of the Guardian that "nothing was more typical of the man than the way he left it". Riled by a jibe from an opposition politician, the retiring Labour leader had retorted across the floor of the house: "My successor will have his predecessor not only beside him but behind him." An anatomical absurdity, quipped Hoggart.

It's interesting, in present circumstances, to look back at the reasons Harold Wilson gave to the cabinet on March 16 1976, and soon thereafter to the nation, for his surprising move. The first Labour leader to resign while in office as prime minister cited his long period in political harness (more than 30 years in parliament, 13 as Labour leader, eight as prime minister); his desire to make way for younger men (although, in fact, he was succeeded, as Tony Blair also almost certainly will be, by an older one); and, not least, "it is my view that my successor should be in post now, to impose his or her own style and to work out the strategy for the remaining years of this parliament".

It seems plausible to assume that three looming crises - the slide of sterling on the foreign exchange markets, a growing left-right split in his party, and a dwindling parliamentary majority - added to the third-term weariness that some had already detected in the pipe-sucking 60-year-old. Conspiracy theorists have suggested darker reasons for Wilson's sudden departure: a medical diagnosis, blackmail, hounding by the secret services. But his biographer, Ben Pimlott, concludes that Wilson really had intended all along to do just two more years following his re-election in February 1974. Here was something very unusual in history: a power-holder who goes voluntarily, at the time of his own choosing.

Has Blair already passed up the chance to do the same - or, at least, to be seen to be doing the same? Perhaps we shall one day read diaries of his close associates recording that he, like Wilson, had all along intended to do just two more years after his re-election in 2005: "May 2007: 10 years as prime minister, nearly 13 as party leader - the perfect time to go!" But, without properly authenticated contemporaneous diaries, most people will now conclude that, even if he does retire on the round anniversary, he will be doing so only under pressure.

Broader reflections are prompted by a few hours spent in the library, turning the smudgy broadsheet pages of 30 years ago. It was, of course, another world. "Provisionals [the Provisional IRA] continue terror campaign against [prison] warders" reported the Guardian on May 3 1976. The next day brought a photograph of shopfronts shattered by a 200lb IRA bomb. "Union sacks anti-Marxist" was the headline over a report of the departure of Mrs Kate Losinska from the Civil and Public Services Association. On May 5 the columnist Peter Jenkins reflected that "the spectre of communism hanging over Italy has many implications for the west". (How matter-of-factly people then talked of "the west".) On May 7, the Guardian carried a photo of Imelda Marcos being greeted by the UN secretary general Kurt Waldheim, and three days later it had one of the Reliant Kitten, a four-wheeled version of the fibreglass, three-wheel Reliant Robin.

In this other world, the prime minister may have resigned voluntarily at a time of his own choosing, but Britain was in much worse shape than it is today. "The past 12 years," wrote the Times on the occasion of Wilson's departure, "have been a period of palpable decline for the United Kingdom: absolute decline in respect of external relations and relative decline in respect of living standards." Later that year, the sterling crisis became so acute that the British government had to go begging to the IMF for a stand-by facility. The previous year, inflation had exceeded 24% and the Wall Street Journal ran the headline "Goodbye Great Britain", advising investors to get out of sterling. Germany (West Germany, that is) and France were both richer per capita than Britain. Compared with Modell Deutschland, Britain was "the sick man of Europe". One overexcited commentator wrote that "the difference as measured in national products per head between Britain and, say, Germany is now as wide as the difference between Britain and the continent of Africa". The facts don't bear him out, but that was the perception. At home and abroad, people spoke of "the British disease". British foreign policy was about "the management of decline".

Today Britain is richer per capita than France and Germany (although in the German case, that's only because of the costs of unification with poorer East Germany). In recent years the British economy has grown faster than those of France, Germany and Italy. France and Germany have been described as the sick men of Europe, while Gordon Brown likes to think there is a British model, combining enterprise and fairness. It's in Germany, not Britain, that we see large-scale strikes and photos of rubbish in the streets. In Whitehall, there's no more talk of managing decline, let alone of running cap in hand to the IMF. British foreign policy is quite self-confident and in many (though not all) respects Britain now projects an image of modernity. In 2012 the Olympics come to London, arguably the hippest and certainly the most cosmopolitan city in Europe.

This self-perception is probably too rosy, as that of 1976 was too gloomy. Germany and France are not doing so badly, and Britain is not doing as well as many Brits like to believe. Moreover, we are all structurally afflicted by the relative decline of what we used to call the west, and especially of Europe, vis-a-vis the rising far east. But it seems fair to say - without descending into psychobabble - that how people and peoples feel about themselves is an important part of how they really are. On the whole, the British feel better about themselves than the French or Germans do; and certainly much better than they did 30 years ago. Given Britain's dramatic loss of empire and world-power status after 1945, this is a remarkable recovery.

Historians and political partisans will quarrel over how much of the credit for this turnaround should go to Margaret Thatcher and how much to Blair - and how much of Blair's achievement is really Brown's. But it's undeniable that a sea change has occurred across those three decades, and been defined by the premierships of Thatcher and Blair, each of them lasting roughly a decade.

So when the media have finally claimed Blair's scalp, in a torrent of often artificial outrage, when Brown has moved into No 10 and the smoke of transition has settled, perhaps we can see ourselves for what we are: a not too badly governed, reasonably prosperous, moderately secure, not too bitterly divided society, facing all the problems of a dangerous world (though when was the world not dangerous?) and those of a relatively declining Europe - but facing them with a degree of confidence unimaginable 30 years ago.

Originally published in the Guardian on 25 May 1995: Harold Wilson was one of the men who ruined post-war Britain. He was a small, posturing, visionless politician, personally pleasant to his friends and even to his enemies. But his public work was a long, strung-out disaster