Britain announced today that it will buy Trident submarine-based nuclear missiles from the United States to replace its aging Polaris submarine nuclear deterent.

Defense Secretary Francis Pym told Parliament that Prime Minister Margaret Thatcher's government would spend about $11.5 billion for the multiple warhead Trident system.

Of that amount, $2.5 billion will go to the United States for the Trident system itself -- 100 missiles and support, equipment -- and Britain will build its own new submarines and warheads for the missiles.

Coupled with an announcement yesterday that Britain also will spend more than $3 billion to equip its army with new tanks and armored personnel carriers, the Trident decision demonstrates Thatcher's determination to maintain Britain as a major military power in NATO despite its continuing economic decline.

Thatcher also has given the military big pay raises and pledged to steadily increase overall defense spending by the 3 percent each year recommended for all NATO nations, despite, the deep cuts she is making in the rest of the British budget.

The cost of Trident in particular is likely to embolden the opposition Labor Party and a growing antinuclear weapons lobby, to campaign against this expensive modernization of British military forces while the country's postwar welfare state social programs are being whittled down.

Trident will increase the range of Britain's submarine-based nuclear missiles from the present 2,880 miles to 4,350 miles, allowing the submarines to roam further in the sea to escape detection.

The four Trident submarines will each carry 16 missiles -- the same number as the present Polaris submarines -- but each larger Trident missile will have eight warheads individually targeted on sites in the Soviet Union.

Today's long-expected announcement followed a year of secret discussions within Thatcher's government and negotiations with the Carter administration. wThe deal was sealed in exchanges of letters during the past week between Thatcher and Pym and Carter and Defense Secretary Harold Brown.

Thatcher said in her letter to Carter that, like Britain's present Polaris submarines, the Trident force will be assigned to NATO but would remain under British control as an independent deterrent if "supreme national interests are at stake."

Throughout her government's consideration of the replacement for Polaris, Thatcher has been convinced that Britain should continue to have its own nuclear deterrent so that the Soviet Union would not be tempted to attack Britain even if it thought the United States might not retaliate.

But some politicians and military experts in her own Conservative Party, the opposition Labor Party and elsewhere in NATO question whether the British deterrent is too insignificant for the high price it must pay.

Although the United States is making unspecified concessions on the price of Trident, there are fears among military experts here that its cost may force Britain to make cuts in its still large contribution to NATO's nonnuclear forces.

The British Army still maintains four NATO divisions in West Germany and its Air Force and Navy play major roles in the defense of the air and sea approaches from the Atlantic to Western Europe.

Although the Labor Party cannot stop Thatcher from going ahead with Trident, it could reverse her decision if it replaced the Conservatives in government before the system was in operation.

Arguing that the government had not made a strong case for spending so much money on Trident, Labor's defense spokesman, William Rogers, said in Parliament today, "We simply cannot approve it."

The only alternatives were to try to keep cheaper Polaris missiles on smaller new submarines beyond the 1990s -- which would be difficult if Lockheed stopped producing Polaris missiles and parts -- or to use land-based cruise missiles like those the United States will be deploying at NATO bases here. But the cruise missiles would require U.S. guidance technology, eliminating Britain's independent control.

Pym told Parliament that the government decided that Trident was the "best and most cost-effective" means of maintaining an independent deterrent.

He said the cost equivalent to 3 percent of the British defense budget for 15 years could be spread out and should not significantly affect other military programs. He added that 70 percent of the money would be spent in Britain, creating "a substantial amount of employment."

Pym said the agreement with the United States was similar to the one former prime minister Harold Macmillan made with President Kennedy in Nassau in 1962 for Britain's purchase of its Polaris missiles. Like Polaris then, Trident, which has been in operation on U.S. Navy submarines since last year, is the most advanced and powerful system Britain could have bought.

In yesterday's announcement on equipping the Army, government officials emphasized that the new tanks and personnel carriers, using a new British-developed armored defense against antitank missiles, also will be built in Britain, "securing many thousands of jobs" in defense industries here.