The commander of the British forces on the Falkland Islands informed Prime Minister Margaret Thatcher early this morning that he had accepted the surrender of all Argentine forces late last night, ending more than ten weeks of hostilities between Britain and Argentina over the South Atlantic islands.

In a message from the Falklands' capital of Stanley to London, released by 10 Downing Street, the British commander, Maj. Gen. Jeremy Moore said: "At 9 p.m. Falklands time tonight, the Argentine general Mario Benjamin Menendez surrendered to me all Argentine armed forces in East and West Falklands together with their impedimentia."

"The Falkland Islands are once more under the government desired by their inhabitants," Moore told Thatcher in the message. "God Save the Queen."

Moore said arrangements were being made to return to Argentina all Argentine troops--estimated in recent weeks by the British to total as many as 8,000 to 9,000 men. He added that the Argentines' weapons and equipment "were being secured."

Thatcher had told a jubilant House of Commons last night that British and Argentine military commanders were talking under a white flag in the Falkland Islands' capital of Stanley "about the surrender of the Argentine forces on the East and West Falklands."

Cheered lustily by members of Parliament who crowded into the chamber to hear her dramatic announcement about 10:15 p.m. here, Thatcher said British forces chased retreating Argentine troops into Stanley yesterday "after successful attacks last night Sunday " on what remained of Argentine defenses on high ground just west of the town.

"As our forces reached the outskirts of Port Stanley, large numbers of Argentine troops threw down their weapons," Thatcher said, after receiving information from British commanders on the Falklands. "They are reported to be flying white flags over Port Stanley."

Thatcher said the negotiations had been conducted by Brig. Gen. John Waters, second in command of the British troops on the Falklands, and the Argentine commander, Gen. Menendez. Saying she would "report further" to Parliament today, Thatcher was silent about whether Menendez had flown to Buenos Aires to consult with the Argentine military government.

She added, "We knew what we had to do and we went about it and did it. Great Britain is great again."

In a scene that rivaled the victorious mood in the House of Commons, Thatcher then walked down Downing Street to plunge into a crowd of well-wishers held back by police barriers. As people reached out to grasp her hands and arms, the crowd sang, "Rule, Britannia" and "For She's a Jolly Good Fellow."

"I never had any doubts at all that everything we did was right," Thatcher told reporters as she walked back to 10 Downing Street in the glare of television lights. "I never had any doubts about our armed forces."

"We are absolutely delighted with the news," Defense Secretary John Nott told reporters across the street at the Defense Ministry. "We have still got to get the final detail worked out. It looks very good.

"It has got to be buttoned up. It is nighttime there in the Falklands . Until we get daylight tomorrow, we won't have further details."

Nott said he expected the negotiations, being conducted at the former barracks of British Marines on the Falklands at Moody Brook on the western edge of Stanley, to continue through the night. But Nott added that he expected the British Union Jack to be flying over Stanley within hours.

Senior military sources here said Waters had full authority from London to negotiate an Argentine surrender, but may talk to Thatcher by telephone Tuesday morning. Waters would not be demanding an unconditional surrender, the sources said, but the Argentine forces would not be allowed to leave the Falklands with their weapons.

"In effect, they have surrendered and ceased fire; it's now just a question of the semantics," said one of these sources. "If they hadn't asked for a cease-fire, we would have gone right through Stanley. It's over."

Defense Ministry officials said the negotiations must also cover West Falkland Island, where there are still about 1,500 Argentine troops in addition to the 7,000 believed to have been in the Stanley garrison. The rest of East Falkland was already under the complete control of about 9,000 British troops, most of whom had pushed toward Stanley since first landing on the island May 21.

More than 220 British troops and 700 Argentine soldiers, sailors and combat pilots have been reported killed in the conflict. Nearly 2,000 Argentine troops have been captured by the British outside Stanley, with most of them already returned to Argentina.

The collapse of the Argentine resistance came suddenly as British forces had continued their methodical advance toward Stanley. The breakthrough began Friday night, when British troops launched a surprise overnight attack on the outer defensive perimeter of the Argentine forces on high ground around Mount Longdon, Two Sisters and Mount Harriet about five miles west of Stanley.

Sustaining casualties estimated here yesterday as including 20 dead, the British troops killed more than twice as many Argentines, according to British military sources, and took about 400 prisoners. They spent the rest of the weekend consolidating these positions overlooking the Argentine occupation force in and around Stanley, continuing to shell them with artillery.

Another overnight attack began Sunday night on what remained of Argentine defenses just outside Stanley on Wireless Ridge northwest of Stanley and Mount Tumbledown and Mount William southwest of the town, Nott announced earlier tonight. This took away from the Argentines the rest of the strategic higher ground around Stanley and left their garrison in a hopeless position, according to military sources here.

From these new positions, Nott said, the British forces "were able to observe large numbers of Argentine soldiers retreating and streaming back into Port Stanley." So, he said, the British troops kept "moving forward to exploit their success."

This news reached London just after 6 p.m. The negotiations began at 2 p.m. Falklands time on the islands. Earlier, military sources said, there had been fierce fighting at Mount Tumbledown, on Wireless Ridge and around the Moody Brook barracks.

"Our troops have been ordered not to fire except in self-defense," Thatcher told Parliament tonight.

She had made a dramatic entrance into the Commmons chamber with other senior ministers while members were voting on industrial training legislation. As the chamber rapidly filled to overflowing, Thatcher sat expressionless.

She remained impassive during her statement and the congratulations that followed.