The invasion of the Falklands Islands by Argentina in 1982 took the then prime minister Margaret Thatcher by surprise, previously secret government papers revealed on Friday.

Thatcher said she "never, never expected" the Argentines to invade the islands in the South Atlantic, according to the papers released by the National Archives.

She only saw it was likely after receiving "raw intelligence" two days before the Argentine forces landed.

Thatcher sent a British naval task force which retook the islands after a short war that left 649 Argentines and 255 British soldiers dead.

The documents also show that Thatcher rejected an appeal by US president Ronald Reagan to allow the islands to be handed over to international peacekeepers so that the Argentines were not completely humiliated.

The defiant prime minister insisted that she had not sent British forces across the globe just "to hand over the Queen's islands to a contact group".

The files, released 30 years after the events, reveal the dramatic testimony that Thatcher gave to a committee reviewing the war in October 1982, a few months after the conflict ended.

"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", Thatcher told the committee.

Britain had made some contingency planning for an invasion, and on March 26, 1982, Ministry of Defence officials came to her with a plan to prevent a full-scale invasion.

She said one sentence in the officials' report 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."

On March 31, 1982, she was shown intelligence suggesting that an invasion of the British-held islands was imminent. The declassified files reveal she said: "It was the worst, I think, moment of my life."

Thatcher 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."

Argentine troops landed on the windswept islands on April 2, 1982.

Reagan made his call to Thatcher in her Downing Street offices at 11.30pm London time on May 31, 1982, as British forces were beginning the battle for Port Stanley, the capital of the Falklands.

The Americans had already proposed dispatching a joint US-Brazilian peacekeeping mission, and the president suggested that the time had come to show magnanimity.

"The best chance for peace was before complete Argentine humiliation," he told her. "As the UK now had the upper hand militarily, it should strike a deal now."

But Thatcher said Britain could not contemplate a ceasefire without the Argentines withdrawing first withdrawal.

According to the official note, she told Reagan: "Britain had not lost precious lives in battle and sent an enormous task force to hand over the Queen's islands to a contact group.

"As Britain had had to go into the islands alone, with no outside help, she could not now let the invader gain from his aggression. The prime minister asked the president to put himself in her position."

British forces had re-captured the Falklands by June 14. Their success helped Thatcher to win a landslide victory at the 1982 general election.

Thatcher, now 87 and suffering from dementia, spent Christmas in hospital recovering from bladder surgery.