Media playback is unsupported on your device Media caption Archive recording of Margaret Thatcher announcing a task force deployment to the Falklands

The 1982 invasion of the Falkland Islands by Argentina took Margaret Thatcher by surprise, newly released government papers have shown.

The then-prime minister only saw it was likely after getting "raw intelligence" two days before the Argentines landed.

Papers released under the 30-year rule show Mrs Thatcher was acutely worried about retaking the islands.

One historian said the documents were among the "most powerful material" declassified in the last three decades.

In October 1982, a few months after the war ended, Mrs Thatcher gave evidence behind closed doors to the Falkland Islands Review Committee, chaired by Lord Franks.

The transcript of that dramatic testimony has now been published for the first time.

"I never, never expected the Argentines to invade the Falklands head-on. It was such a stupid thing to do, as events happened, such a stupid thing even to contemplate doing", Mrs Thatcher told the Franks Committee.

There had been some British contingency planning in the month before the Argentine invasion of the Falklands.

On 26 March 1982, Ministry of Defence officials came back to Mrs Thatcher with a plan to deter a full-scale invasion.

The Falklands War 2 April 1982: Argentine forces invade Falkland Islands. Other British South Atlantic territories including South Georgia are seized shortly afterwards

Argentine forces invade Falkland Islands. Other British South Atlantic territories including South Georgia are seized shortly afterwards 5 April: A British task force of more than 100 ships sets sail for the South Atlantic

A British task force of more than 100 ships sets sail for the South Atlantic 25 April: South Georgia is recaptured by British forces.

South Georgia is recaptured by British forces. 2 May: Argentine cruiser General Belgrano sunk by HMS Conqueror, killing more than 320

Argentine cruiser General Belgrano sunk by HMS Conqueror, killing more than 320 21 May: Three thousand British troops begin landing at San Carlos on East Falkland

Three thousand British troops begin landing at San Carlos on East Falkland 28-29 May: British forces recapture Goose Green.

British forces recapture Goose Green. 8 June: British landing craft are bombed at Fitzroy, killing more than 50 men

British landing craft are bombed at Fitzroy, killing more than 50 men 13 June: Argentine positions on mountains overlooking the capital Port Stanley are taken

Argentine positions on mountains overlooking the capital Port Stanley are taken 14 June: Argentine forces surrender. British troops march into Stanley 255 British servicemen and three Falklands civilians died during the conflict. The number of Argentine dead is estimated at about 650 The Falklands War: Timeline

One sentence shocked her, and she wrote it in her diary: "Moreover, if faced with Argentine occupation on arrival there would be no certainty that such a force would be able to retake the dependency."

She told the committee: "You can imagine that turned a knife in my heart, that lot."

However, in her oral evidence, she said she had still considered an invasion unlikely: "I again stress, I thought that they would be so absurd and ridiculous to invade the Falklands that I did not think it would happen.

"Nevertheless, one has always to make contingency plans, and soon after we got the South Georgia incident happening."

The picture changed on 31 March 1982 when Mrs Thatcher was shown intelligence suggesting that an invasion was on the cards: "I just say it was the worst I think moment of my life."

She also told the committee: "That night no-one could tell me whether we could retake the Falklands - no-one. We did not know - we did not know."

The British foreign secretary at the time, Lord Carrington, also gave evidence to the Franks Committee, where he too held the view that Argentina was not going to invade the Falklands.

"I have been accused, and was accused violently after 2 April in the House of Commons, and in the press and elsewhere - of wilfully ignoring signs and statements and evidence, and just ignoring it. I can truthfully say I did not do any of these things… they (the signs of an invasion) were not there," Lord Carrington said.

On 5 April, Lord Carrington resigned as foreign secretary, which prompted this reaction from Mrs Thatcher: "I had tremendous confidence in Peter Carrington, and his loss seemed to me a devastating blow for Britain and I would back him up all the way."

The political historian Lord Hennessy said Mrs Thatcher's evidence about the Falklands War was some of the most powerful material to be declassified by the National Archives in the last three decades.

"It's only three months after the end of the war, so it's immensely vivid. It's still coursing through her veins.

"She also has this great power of expression - she's a primary colours politician."

Argentina's invasion of the Falklands may have come as a surprise to Mrs Thatcher and her ministers, but the government papers do reveal some interesting pointers.

Image caption Part of Margaret Thatcher's testimony given to the Falkland Islands Review Committee

As early as 1977 there was a British intelligence assessment that Argentine military action was possible if talks over the Islands went badly.

At the end of that year, the British government decided to send a submarine and two frigates to the South Atlantic.

However, the ships' movements were kept secret.

Indeed, there was no conspicuous British naval presence in the South Atlantic in the five years that preceded the war. This may be why Argentina thought Britain would not launch an attack to retake the Falklands in April 1982.

Media playback is unsupported on your device Media caption Mrs Thatcher defends attacking the Argentine cruiser General Belgrano in which 320 died

Also, Britain's ambassador in Buenos Aires in 1982, Anthony Williams, felt some of his warnings sent to London were simply ignored.

"Argentina is not just another 'banana republic' - a tin pot country led by a tinpot dictator," he wrote in his valedictory despatch in June 1982.

"Argentina has its share of vandals, hooligans and roughs. But this is not the whole story, nor was the seizure of the islands a simple act of brigandage."

Lord Armstrong was Margaret Thatcher's Cabinet secretary at the time. He told the BBC: "If we had failed to recover the Falklands she would have had to go.

Media playback is unsupported on your device Media caption The BBC's Laurie Margolis speaks about how he found out exactly what was going on in the Falklands and broke the news story

"If we had lost it she couldn't have won the next election. Her own political career, and that of her party, were on the line.

"During those weeks, she lived more fully and more completely than at any time in the rest of her time as prime minister."

Argentine forces landed on the islands in 2 April 1982 and the recapture by a British task force was completed on 14 June.

Argentina says it inherited ownership of the islands - which it calls Las Malvinas - from Spain, arguing that British colonists occupied the islands by force in 1833 and expelled settlers - thus violating Argentina's territorial integrity. It also bases its claim on the islands' proximity to the South American mainland.

Some 255 British servicemen and three Falklands civilians died during the conflict. The number of Argentine dead is estimated at about 650

All document images courtesy of the National Archives