Decisions by the governments of New Zealand and Australia to limit participation in U.S. nuclear-related defense activities are the result of widespread antinuclear sentiment that has become increasingly important in the domestic politics of both countries.

While New Zealand's decision to prohibit visits by nuclear-armed U.S. warships stems from a campaign promise that helped elect Prime Minister David Lange last July, Australia's refusal to provide logistic support for U.S. testing of the MX missile represents a sudden change in policy. It apparently was provoked by pressure from powerful antinuclear leaders within the ruling Labor Party.

Until late last week, Australian Prime Minister Robert Hawke seemed to be making some effort to persuade Lange that New Zealand's lack of cooperation with U.S. defense plans would damage the overall alliance of the United States, Australia, and New Zealand known as ANZUS.

After the United States made its first request for a port visit last month, Hawke wrote a letter to Lange expressing his support of the Americans.

In a reply two weeks ago, New Zealand's acting prime minister, Geoffrey Palmer, defended the ban on visits and said no outside pressures would change it.

At about the same time, Hawke and several of his Cabinet members quietly agreed to follow through on an earlier secret commitment by the previous conservative government of Malcolm Fraser to provide refueling and food facilities for U.S. planes and crews to monitor the missile splashdown in international waters off the Australian coast, according to reports from Australia.

News of that decision appeared in the Australian press Friday, the day before Hawke flew to Washington from meetings on agricultural trade in Brussels.

His political party, many of his own ministers and much of the public were outraged both by the secrecy of the decision and by a perception in Australia that the decision brought the country, however peripherally, into a nuclear weapons program, according to Washington Post special correspondent Peter Costigan, who is traveling with the prime minister.

News of this displeasure reached Hawke in Brussels, and following consultations with party leaders in Canberra, Hawke's aides let it be known to Australian reporters that the decision was being "reconsidered," Costigan reported.

Yesterday, Hawke told the Reagan administration that Australia is withdrawing from a commitment to allow U.S. aircraft to use the Australian bases to monitor an MX missile test.

Secretary of State George P. Shultz, after a meeting with Hawke, said the United States will bow to antinuclear sentiment and conduct the test next summer in the Tasmanian Sea, between Australia and New Zealand, without Australian help.

Shultz's decision will help Hawke, a relative conservative in the ideological spectrum of his Labor Party, to keep at bay at least for the time being a growing antinuclear movement in Australia, Canberra-based Costigan reported.

It is clearly a minority movement even within the governing Labor Party, and it has had few victories in the past. The only significant ones have been delays of and restrictions on the mining and export of uranium.

The movement is certain to claim the abandonment of Australia's participation in the MX missile testing as a major victory and therefore is likely to become bolder in the months ahead. Support in the wider Australian community for the aims of the movement is probably less than 20 percent, Costigan reports.

But because of the movement's influence in the Labor Party and because branches of the movement now hold the balance of power in the Senate, it could achieve victories out of proportion to demonstrated public support.

The antinuclear movement became a force in its own right -- for the first time largely detached from the left wing of the Labor Party -- as recently as Dec. 1, the date of the last general elections.

It formed the Nuclear Disarmament Party just weeks before the voting and won up to 10 percent support in some states, surprising politicians and observers. Voters have traditionally shunned parties other than Labor and the conservative coalition of the Liberal and National parties.

The new party campaigned strongly against Hawke on the grounds that he was not doing enough to remove nuclear connections in Australia. It specifically urged an effective end to the ANZUS treaty, neutrality for Australia, closure of the American bases and bans on all visits by nuclear ships and U.S. warplanes.

The disarmament party and its ideological cousin, the left of the Labor Party -- which frequently meets as a faction within the ruling party -- got a psychological lift from the victory last July of the Labor Party in New Zealand, led by Lange.

Before Hawke's visit to Washington, the antinuclear forces in his party broke with the long tradition of keeping disputes within the party. They published a letter that 24 Labor members of Parliament sent to Lange urging him to maintain his policy of banning American nuclear warships and urged him to ignore pressure from Hawke to change that policy.

While insisting that he was not acting on an errand for Washington and was merely seeking the New Zealand leader's views prior to his Washington visit, Hawke had argued with Lange that individual members of the three-nation ANZUS alliance could not take different positions on matters like the visits to each other's countries of military forces.

In New Zealand, despite warnings from senior military advisers that the United States would likely retaliate if the government refused to port visits by American destroyers, Lange proceeded with the ban, according to reports from Wellington yesterday.

New Zealand's action has heartened opposition groups in Japan, that have fought unsuccessfully for decades to bar from Japanese waters U.S. warships which they believe carry nuclear weapons.

Although it appears to have had little effect on the ruling Liberal Democratic Party of Prime Minister Yasuhiro Nakasone, the move is being viewed with concern by the Nakasone government, which fears disruption of military cooperation with the United States.