In May 1978, protesters in Iran's major cities laid waste to luxury hotels, banks and government offices that symbolised the profligate regime of Shah Mohammed Reza Pahlavi. It was the first clear sign that students and Islamist revolutionaries were loosening the pro-Western dictator's iron grip on power.
But the upheaval and bloodshed that presaged the Iranian revolution did nothing to dim the belief of Her Majesty's Ambassador to Iran that the autocrat (and lucrative patron of the British arms industry) would successfully resist any effort to unceremoniously usher him from power.
Indeed, secret documents released under the 30-year rule at the National Archives in Kew, west London, show that Our Man in Tehran confidently predicted that the Shah would emerge triumphant right up until the final days of his regime and urged his bosses in Whitehall to support the ailing monarch as the best hope for Iranian stability – even as his embassy was being ransacked and set on fire.
In a fit of diplomatic hubris as the Shah's security forces gunned down protesters in May 1978, Sir Anthony Parsons sent a telegram to the Foreign Secretary, David Owen, insisting that there was no "serious risk" of the self-styled king of kings being driven from his throne.
Sir Anthony wrote: "It is easier for an ambassador to predict the worst than to give a relatively optimistic forecast. If the worst happens, he is congratulated on his foresight: if nothing happens, his prophecy is forgotten. But my honest opinion is that the Pahlavis, father and son, have a good chance and my guess is that they will make it."
Despite attempts to appease his opponents by tackling rampant inflation and promising elections, violent protests became a regular occurrence as the Ayatollah Khomeini agitated from exile in Paris.
The Shah had established a reputation for excess seven years earlier when he celebrated the 2,500th anniversary of the Iranian monarchy with a lavish tent city built next to the ruins of Persepolis. The festivities cost an estimated £50m.
Britain had benefited from the Shah's largesse. In the early 1970s, he placed an order worth £100m – equivalent to nearly £1bn today – for 800 Chieftain tanks.
But as the uprising intensified and the body count rose, Sir Anthony insisted to London that his faith in the 58-year-old monarch was undimmed. After one meeting early in November, the diplomat gushed that the Shah had "recovered his morale" and "was prepared to examine every feature of the abyss with admirable calmness and objectivity".
The documents show that the ambassador's confidence was not shared by the Prime Minister James Callaghan. In a handwritten note, he warned the Foreign Office not to be "over-influenced" by Sir Anthony's optimism. "I wouldn't give much for the Shah's chance," wrote Mr Callaghan. "I think Dr Owen should start thinking about reinsuring."
Sir Anthony's support for the Shah remained resolute despite an attack on the British embassy on 5 November 1978 which reduced the diplomatic mission to a smoking ruin.
Even as London drew up plans to evacuate British nationals, three weeks before the Shah fled into exile, paving the way for the return of Ayatollah Khomeini and the establishment of the Islamic Republic, the message from Tehran remained upbeat.
The gamble that cost a party power
The perils of a prime minister delaying a widely-anticipated general election are made clear in papers detailing James Callaghan's disastrous gamble to ignore a recovery in poll ratings and abandon plans for a snap vote in 1978.
Documents just released under the 30-year rule show that Mr Callaghan believed he would wrong-foot the Conservative Party under its new leader, Margaret Thatcher, by ignoring speculation in August 1978 that a general election would be called in October; he considered his chances of returning to Downing Street would be higher in 1979.
In a situation with uncomfortable echoes for Gordon Brown and his decision to shelve an early election in 2007, Mr Callaghan was eight months later unceremoniously dumped from office by a resurgent Tory party under Mrs Thatcher, following the industrial relations anarchy of the "winter of discontent".
The papers reveal that in August 1978, Mr Callaghan returned from his summer holidays with improved poll ratings but decided that calling a quick election would be interpreted by the electorate as opportunism in the wake of tax cuts. His principal private secretary, Ken Stowe, said Mr Callaghan "was averse to going to the country in October when it could be held that the timing was dictated only because at that point in time tax concessions etc, were proving popular. Mr Callaghan was soon struggling to keep a lid on growing economic troubles as he tried to curb inflation by placing a 5 per cent cap on pay rises.
The documents show that he did so despite a warning from his economic adviser, David Lipsey, that Britain was facing a "winter of discontent" – seemingly the first use of the phrase to describe the ensuing strikes which left rubbish uncollected and bodies unburied.
Mr Lipsey wrote in October 1978: "Politically, abandoning 5 per cent will be embarrassing. But could we win an election after a winter of discontent in which a large chunk of the [parliamentary Labour Party] will be sympathising with the malcontents?"
Scots were focus of diplomatic dispatch
After its momentarily glorious but otherwise poor display in the 1978 World Cup finals, the Scottish football team quickly grew accustomed to public condemnations from fans and pundits alike for their early exit from the tournament in Argentina.
Until now, the fact that the critical chorus was joined by a senior British diplomat in Buenos Aires has remained unknown.
A blistering dispatch which condemned manager Ally MacLeod's side as "provincials" who lacked the professionalism to prosper on the world stage was cabled to the Foreign Office in London by Hugh Carless, the British charge d'affaires in the Argentine capital.
The Scottish team, the only home nation to qualify for the finals, had flown out of Glasgow airport buoyed by expectations that they would win the trophy or, in the words of the manager, at least win a medal. But after defeat in their opening match to Peru and a draw against Iran, the only glory came with a remarkable 3-2 win over the eventual runner-up, Holland. The Scottish team returned empty-handed after being eliminated at the first hurdle.
In a telegram, Mr Carless felt moved to turn to diplomatic punditry: "In retrospect, it would seem that the poor Scottish performance was due to complacency and lack of professionalism on the part of all concerned with Scottish football. They seemed provincials out of their depth in international waters."
Mr Carless noted that the downfall of the winger Willie Johnston, who was sent home in disgrace for failing a drug test, had produced a further complication after an Argentine lawyer threatened to start extradition proceedings to bring the Scottish player to Buenos Aires to face a criminal trial.
Fortunately for Johnston, the legal case came to nothing.
'Crazy' cost cuts left UK vulnerable to invasion
Britain would have been overwhelmed by a Soviet attack in the late Seventies because the RAF's key fighter squadrons had enough ammunition to last just three days. Air bases only had a stock of surface-to-air missiles sufficient for one reload as a result of"crazy" defence cuts.
The parlous state of the nation's ability to cope with the Cold War turning hot was so severe that Prime Minister James Callaghan wrote on a top-secret document outlining the shortages: "Heaven help us if there is a war!"
Papers released under the 30-year rule reveal the Royal Navy could not have kept the English Channel supply routes clear as it only had enough mine-sweeping vessels to keep clear the waters around the Scottish nuclear submarine base at Faslane.
The scale of the military shortfall became clear in 1978 after the UK's senior intelligence body, the Joint Intelligence Committee, said the Soviet Union had 200 bombers and 18 submarines it could unleash against Britain. The committee document stated that the Army would take at least 15 days to reach full strength but it would still be unable to cope with expected Soviet sabotage, military chiefs said, adding that much of the command and control system was housed in unhardened bunkers vulnerable to sabotage and jamming.
"It is doubtful if the defences of the UK would be sufficient, even against only conventional attack, to prevent vital elements of Nato's military capability being substantially damaged or destroyed," the report said. " If present trends ... continue, the gap will widen between the forces available to attack [the] UK and our ability to defend against them."
Callaghan described the situation as a "scandal". His defence secretary, Fred Mulley, told him the depleted state of British forces was a result of "crazy" cost cuts introduced a decade earlier.
Spending constraints meant that all the Government could do in response was order extra ammunition for the RAF and buy second-hand missiles from Sweden.
Saatchis fall out of favour
The extent to which the Labour Government of 1978 was rattled by the advertising genius of Charles and Maurice Saatchi is revealed in documents showing that ministers called for the agency to be sacked from taxpayer-funded campaigns after it began working for the Tories.
The furious demand by Department of Employment ministers came shortly after the release that year of the "Labour Isn't Working" poster, which was credited with helping put Margaret Thatcher in No 10 in 1979.
Saatchi & Saatchi, set up by the brothers three years earlier, had previously won contracts for government advertising campaigns on youth employment, health education and the National Savings Bank.
In August 1978, the civil service minister Charles Morris wrote to Prime Minister James Callaghan detailing a complaint that the Saatchis' status as advertising gurus to the Tories produced a conflict of interest. A junior minister in the Department of Employment, John Grant, wanted them sacked.
But the documents show that there was little appetite inside Downing Street for any intervention. Callaghan agreed, writing across the top of the briefing note: "No action."