Foreign ministers of the Western alliance today condemned the Soviet invasion of Afghanistan and called for "immediate, unconditional and total withdrawal" of Soviet troops from the country.

A joint communique of the North Atlantic Treaty Organization said the six-month Soviet occupation "jeopardizes world peace."

U.S. Secretary of State Edmund Muskie told reporters that the Soviet troops appeared to be "hunkering down" in Afghanistan for a two or three-year stay and termed Moscow's announced withdrawal there a "red herring."

Muskie defended Western measures taken so far to pressure the Soviets into leaving Afghanistan as "still in place still working." No new measures were publicly suggested at this session.

Meeting in the wake of the Venice summit, the NATO ministers sought to reinforce the show of alliance unity demonstrated at the earlier gathering of the heads of the world's seven most powerful noncommunist countries. But differences continued to show through between America and Europe on foreign policy, particularly on the Middle East.

U.S. officials blocked a European effort here to win NATO endorsement of the right to Palestinian self-determination -- diplomatic code words referring to the right of Palestinian refugees in Gaza and the West Bank of the Jordan River to determine their own political future.

Such a right was endorsed by the nine national of the European Economic Community at their summit meeting two weeks ago. But today's NATO statement held to less specific language preferred by the United States. It spoke only of the need for a Middle East settlement to achieve the "legitmate rights of the Palestinian people."

The earlier European action drew an Israeli protest. It also disturbed U.S. officials who worried that further European initiatives in the Middle East could ruin the Camp David framework for Egyptian-Israeli peace talks -- a framework that the Europeans believe should be expanded to include the Palestinians.

Questioned on why he wanted to temper NATO's Middle East position, Muskie said he would leave the issue of Palestinian self-determination to be negotiated in the Camp David process. He said the United States had not been alone in NATO in resisting the European move.

The ministers also issued a separate declaration condemning terrorism and taking special note of the holding of American hostages in Iran.

The talks here -- the first round-table foreign policy discussion among NATO ministers since the Soviet invasion of Afghanistan in December -- were nearly as significant for what was not discussed as for what was.

Muskie said there had been no discussion, either in formal conference or in the corridors, of giving arms or other kinds of aid to the Afghan rebels. The possibility of increased Western support for the Afghans who are resisting the Soviet occupation came up earlier this week at the Venice summit in remarks made by British officials.

Nor was there any mention here of the possibility of negotiating with the Soviet Union on a phased withdrawal from Afghanistan. This idea, first mentioned in a press conference by President Carter in February, was revived this week in public statements by Carter and in press briefings given by presidental aides.

In condemning the Soviet invasion, the NATO ministers noted that it has led to the flight of about 1 million refugees. They also stressed that the invasion is more than just a regional concern and poses "very serious implications for the general strategic situation" by the show of Soviet readiness to use force to "shift the balance of forces in its favor."

The ministers said the invasion "had done serious damage to detente," adding that "detente cannot be pursued in one region of the world regardless of development in another."

At the same time, the 15 NATO ministers reaffirmed interest in reviving arms control and disarmament talks. The ministers cautiously endorsed a French proposal for an East-West European conference on disarmament. The endorsement was significant since it seemed to reflect U.S. acquiescence to the two-year-old French plan, which calls for official discussions with Moscow to begin at the follow-up meeting of the East-West Helsinki Conference on European security to be convened in Madrid this November.

Even so, the NATO statement referred only to the first phase of the French plan, supporting negotiations on so-called confidence-building measures with the Soviets. The second phase which would deal with actual limits or reductions in arms, was not mentioned. Also, U.S. officials are said to expect the talks, if they ever occur, to be long and drawn out.

It seemed likely but not certain that West German Chancellor Helmut Schmidt would informally raise the matter of a European disarmament conference to Soviet authorities when he is in Moscow next week for talks with Soviet President Leonid Brezhnev.

NATO ministers were briefed on the trip by West German Foreign Minister Hans-Dietrich Genscher, who sought to reassure colleagues of Bonn's continued commitment to NATO's decision last December to station 572 nuclear missiles in Western Europe capable of reaching the Soviet Union, to offset a buildup of similar Soviet weapons targeted on Western Europe.

More significant, but given less public attention, was the inability of the Belgian government here to give its final endorsement of the NATO missiles plan. The belgians supported the plan in December, but reserved the right to review their position after six months, and the NATO decisions now has encountered serious resistance there.

The NATO ministers expressed hope that the SALT II treaty, now stalled in the U.S. Senate, would be ratified "at the earliest opportunity." s

Commenting on this, Muskie came close to saying that the treaty could not be ratified while Soviet troops remain in Afghanistan, but declined to state such a judgement categorically.

Taking special note of the need to strengthen NATO's southeastern flank, the NATO ministers mentioned the urgent need for more assistance for Greece, Portugal and especially Turkey. The United States granted Turkey $250 million in assistance in March, and WestGermany is organizing an additional $500 million military aid package.