It was towards the end of the 1979 general election campaign, with his Labour government limping towards defeat, that Jim Callaghan remarked to his chief policy adviser that it barely mattered what he said or did. "There are times, perhaps once every 30 years, when there is a sea change in politics," Callaghan said wearily. "I suspect there is now such a sea change - and it is for Mrs Thatcher."
Three decades on, there is a growing consensus that another sea change is at hand. While Gordon Brown's success at his party conference has managed to hold off the plotters and conspirers for another few weeks, it is striking to reflect that his position remains much weaker than Callaghan's in 1979. Often cast as the incarnation of Britain's failings in the age of flares, Callaghan was nevertheless the most popular and trusted senior politician in the country. Unlike Brown, he ran well ahead of his Tory rival in the opinion polls. And even after the Winter of Discontent, Labour lagged behind the Tories by no more than 10 per cent.
To a generation of new Labour activists, history began in 1979 with the collapse of Callaghan's government - a deserved reward, as they saw it, for old Labour's left-wing politics. Never mind that Callaghan was actually on the right of the Labour Party. To Tony Blair, Gordon Brown and their followers, he was an embarrassing dinosaur, a relic of the past they hoped the electorate would forget. A dedicated trade unionist from the provincial working classes, a poor boy who could never afford a university education, a bluff patriot who disdained trendy metropolitan permissiveness and shuddered at ostentatious displays of wealth, he would look bizarrely out of place on today's Labour front bench. Yet now Brown finds himself in a deeper hole than any that Callaghan ever inhabited. And however much they dread the Tories' return, old Labour loyalists must find it hard to suppress a smirk.
There can be no exact parallels between the crisis of the late 1970s and that of the late 2000s. Still, to echo Mark Twain, history may not repeat itself but it does rhyme. And at first glance the assonances between the late 1970s and the present are remarkable. War in the Middle East and on the edge of the old Russian empire sends oil prices rocketing. As inflation mounts, families struggle to meet their fuel bills and mortgage repayments. In the headlines: controversies over immigration, energy, the environment, scientific progress. On the television: endless costume dramas, Battlestar Galactica and Doctor Who. On the pitch: England fail to qualify for a major football tournament. And at Westminster, an exhausted, unpopular Labour government stumbles towards apparently certain electoral disaster.
Yet the superficial resemblances only take us so far. A common criticism of our political masters is that they lack a sense of history. But there is such a thing as being prisoners of history, a classic example being the obsession with the false analogies of Munich and appeasement that underpinned support for the war in Iraq. And the past has always been a problem for new Labour, not merely because they knew too little about it, but because they were obsessed with avoiding what they saw as the left-wing mistakes of the 1970s and 1980s.
In truth, the comparison between the present crisis and that of the 1970s falls down almost immediately. One obvious point is that the economic mess of the 1970s was different in character, cause and degree. It did not start with the 1973 oil shock, as is often thought; its roots went back to Harold Wilson's heyday in the 1960s, when the figures for inflation, strikes and pay settlements began their ominous rise. Behind this lay two more serious problems.
First, there was the long-term sickness of the British economy. There was an overvalued pound, inept management, terrible labour relations and feeble productivity, all of which was a recipe for expensive, shoddy and uncompetitive goods. And second, there was a dramatic global shift, the aftershocks of which can still be felt today. As old enemies and newly independent colonies caught up with the Anglo-American industrial leviathans, world commodity prices began an inexorable rise - exacerbated by the Americans' war in Vietnam, which they financed not through taxation but through the disastrous means of simply printing more money.
The terrible consequences of this combination will be familiar to anyone who lived through the 1970s, and while we cannot yet know how the current crisis will compare, it would have to be very bad indeed to eclipse the misery that prevailed from the early 1970s to the mid-1980s. Inflation may seem high now, but when it topped 25 per cent in 1975, supermarkets were reduced to putting sticky labels on their products, which could be peeled off every few days and replaced with higher prices. Oil price hikes left drivers queuing for hours across the western world.
And then, of course, there were the strikes. Not just the big, landmark strikes that everyone remembers - Scargill at Saltley in 1972, the miners against the government in 1974, the Winter of Discontent five years later - but lots of small, unofficial strikes that closed schools and council offices, shops and ports; that turned off the power and sent candle sales through the roof; that brought trains juddering to a halt, and stranded you in Hull when you really wanted to be in Hereford.
A common fallacy on the left is that this was some sort of golden age for British workers, a brief halcyon moment before Thatcherism eviscerated the unions and turned us all into greedy consumers. But the strikes of the 1970s were not a symbol of health: quite the opposite. Old lefties bridle when commentators refer to the industrial anarchy of that period, but anarchy is precisely what it was. Union bosses were not too strong; if anything, they were too weak. Unable to control shop stewards or curb a rash of unofficial strikes, they appalled sensible observers such as the West German Social Democrat Helmut Schmidt, who could never understand why British unions were so fractious and fragmented.
And just because Thatcher's shock troops claimed that the unions had become greedy and ungovernable, it does not mean that the opposite must be true. "We'll tell it to you straight," a group of Cohse hospital workers told Callaghan's policy chief, Bernard Donoughue, during the Winter of Discontent. "Our purpose is to get more than you offer, and whatever you offer, it won't be enough."
Once, Callaghan's fidelity to the unions had earned him the appellation "the keeper of the cloth cap". Now the cloth cap was in tatters. "What do you say about the thuggish act of a walkout, without notice, from a children's hospital?" he asked his cabinet in despair. Never in 50 years, he said, had he been "so depressed as a trade unionist".
But the real point about the Winter of Discontent, putting aside the rats and the rubbish, the darkened hospitals and the unburied dead, was that it set the seal on a decade in which Britain seemed in terminal decay. For all the ills of British society in 2008, there is absolutely no comparison between then and now. Yes, wealth was less unevenly distributed, as the left is always quick to point out. But there was less and less of it, because living standards were actually falling, especially at the bottom.
It is almost impossible to make the imaginative leap and recapture what this must have felt like: the sensation, after years of affluence and aspiration, of falling behind. Tough, too, to imagine living in a country where nothing works: where landmark businesses such as Rolls-Royce teeter on the brink of bankruptcy, where the trains are dirty and the streets shabby, where the national game has become a blood-and-beer-soaked battleground, where you open a door and the handle comes off in your hand. Living in Britain was like being trapped in Rigsby's boarding house in Rising Damp - a seedy, squalid dump where the self-regarding proprietor is forever cutting costs and moaning about his memories of the war, the black tenant faces daily prejudice, and the damp and the cold are always there, seeping into your spirits, morning and night.
One anecdote from the recently published second volume of Donoughue's Downing Street Diary can stand for the whole depressing story. At the beginning of September 1978, Callaghan was dithering over whether to call an election in October or to wait until the spring - a dilemma he got disastrously wrong. His private office, however, was distracted by the problem of his new car. Since the prime minister must be seen to buy British, the office ordered two new Rover 3.5s from British Leyland. "They took a long time to arrive," writes Donoughue ominously, and then: "When they finally came they were found to have 34 mechanical faults and had to be sent back to the garage to be repaired and made safe. Then in August they were sent to be converted to the PM's special safety needs - bombproof, bulletproof, special radio system, etc. This all cost a vast sum of money."
Finally the cars came back from the garage, and one morning Callaghan decided to go for a drive. The car was bowling cheerfully along, the sky clear and bright, and so he tried to open the window, pressing the electronic button that, through the marvels of Rover's 1970s technology, would do it automatically. "The result," writes Donoughue, "was that the window immediately fell in on his lap. The PM has now said that he does not wish to see the new cars again."
This sense of national incompetence, failure, decay and decline was a central element in British life in the 1970s, from Basil Fawlty railing against his staff to Scotland's football manager, Ally MacLeod, watching in mute horror as his self-proclaimed world champions collapsed against Peru in the national humiliation of the 1978 World Cup. "Do you, like me, sometimes feel that we've been slipping?" Callaghan asked the nation, with candour almost unthinkable today, in a televised address on his first night as prime minister.
It is no wonder that this was the decade when James Bond became a joke. Only by casting Roger Moore as the suited hero and turning the films into comedies could the franchise be preserved, for no audience could ever take seriously a British secret agent whose gadgets did not fall apart in his hands. From the boardroom to the shop floor, from the football pitch to the small screen, world-beaters had become laughing stocks. When one of Basil Fawlty's German guests shakes his head and asks, "However did they win?" it is not just Basil he is judging - it is an entire nation.
Neither is it any wonder that this was the heyday of political extremism in postwar Britain. Though we bemoan the bland managerialism of modern politics, it is a safe bet that few of us would want to go back to the days when retired generals openly advertised for recruits to instal a right-wing government of national unity. Nor should we be nostalgic for the days when the National Front and the Socialist Workers fought pitched battles in London's streets, or when trade union officials talked seriously of bringing down the elected government and unleashing class warfare. And we are surely better off with Tony Benn as the chattering classes' favourite pundit than with him at the cabinet table, the self-appointed tribune of the plebs, talking airily of nationalising the country's biggest firms, imposing stringent import controls and building a siege economy to rival North Korea's.
Yet there is something to be said for the late 1970s, after all. Although both left and right often deny it, it was in this period, not in the 1980s, that Britain took its first faltering steps towards the dramatic transformations associated with Thatcherism. It was Jim Callaghan and Denis Healey, not Margaret Thatcher and Geoffrey Howe, who wrung most of the inflation out of the system. It was Callaghan who told the Labour conference in 1976 that "you can't spend your way out of a recession". And it was Healey who told the same conference - to a chorus of jeers - that "very painful cuts in public expenditure" had to come if Britain was to turn the corner.
These were tough choices, and it took tough men to make them. The last old Labour government is often caricatured as a gaggle of wimps and fanatics, but it had more than its share of hard-headed veterans who realised that change must come. When the pound collapsed in the summer of 1976 and Callaghan was forced to turn to the IMF for help, grimly swallowing £3bn in spending cuts in the next few years, he showed guts and leadership well beyond those who now aspire to lead his party. It was one of the great unsung turning points of modern British history: the point at which the people at the top realised that only the strongest medicine would cure the nation's ills.
But the IMF crisis of 1976 was a turning point in another sense, too. As David Marquand has argued, it was the moment when the parochial, introspective assumptions of British politics were shattered for good. For decades, left and right alike had imagined Britain as though it were an economic island, sealed off from the global tides that lapped at foreign shores. The two most emotive orators of the day, Enoch Powell and Tony Benn, both dreamed of a utopian Britain insulated from the new realities of the international economy. And if Benn had had his way - as was not impossible - Britain would have voluntarily plunged into a disastrous dark night of isolation, betraying the long history of trade and internationalism on which our prosperity was based.
But the events of 1976 exposed such pipe dreams for the fantasies they were. What Callaghan and Healey realised - as, to their credit, did Thatcher and Blair after them - was that Britain was now inextricably locked into a vast global system. And so it is a myth that if Callaghan had called the election a year earlier, Britain would have avoided the hardship and suffering of the early to mid-1980s.
A Labour government re-elected in 1978 would have pursued a similar economic course to that charted by the first Thatcher administration, albeit with more hesitation, more compassion for the victims of deindustrialisation, and a longer, more agonising divorce from the unions. Pits would still have closed - after all, they had been steadily closing since the 1960s. Uncompetitive businesses would still have gone to the wall; millions would still have been out of work. It was not Thatcher who "destroyed" British manufacturing; it was the reality of economic change in an age of globalisation. What both political parties now choose to forget is that the placards that read "No to Tory cuts" in 1980 had read "No to Labour cuts" just a year before.
In more ways than one, therefore, that grim, gloomy moment at the end of the 1970s was the making of 21st-century Britain. And yet, worryingly for Labour supporters, there is still another glaringly obvious difference between then and now. Although they lost badly in 1979, and lurched to the left afterwards, Labour remained a popular party with an impressive array of parliamentary talents, rich seams of ideological conviction, and a large though diminishing base in the cities and industrial areas. Labour supporters might have argued passionately about what their party stood for, but at least they all agreed that it must stand for something. But what will become of Labour after what looks like inevitable electoral defeat in 2010 is not obvious at all. Its benches hardly glitter with ability; its ideological cupboard seems empty; its core supporters seem to have lost interest. It may seem inconceivable that the party could end up yearning for the days of Michael Foot and Neil Kinnock; yet that fate may be surprisingly close at hand.
One last thing, as Columbo, that icon of 1970s television, used to say. When Margaret Thatcher walked into Downing Street in May 1979, the beneficiary of the great sea change that her adversary had seen coming, she was still an unknown quantity. Her manifesto had been surprisingly moderate, and power had changed hands so many times in the 1970s that nobody expected her to last for more than a decade. Talking to the BBC on election night, senior Labour ministers such as Denis Healey and Merlyn Rees remained cheerfully upbeat, as though confidently expecting that they would be back in a few years. In the studio, the Tory journalist Peregrine Worsthorne lamented that Thatcher's majority was too small to do anything radical. Britain was in for another period of consensus politics, he mordantly predicted.
Nobody knew what was about to hit them - a lesson, perhaps, for all those who fancy giving nice Mr Cameron his chance.
Dominic Sandbrook's "White Heat: a History of Britain in the Swinging Sixties" is published by Abacus (£12.99)