In an attempt to prevent Namibia's move toward independence from South Africa from flaring into warfare, the United States and its allies called yesterday for an urgent meeting of foreign ministers from the countries involved at the United Nations next Monday and Tuesday.

U.S. officials said the new negotiations are expected to include the same international cast of nations that have played roles in the fragile two-year effort to create an independent Namibia out of the territory controlled by South Africa once known as Southwest Africa.

The plan for U.N.-supervised elections to choose the new state's government has been jeopardized by continuing warfare between South Africa and the Guerrilla forces of the Southwest Africa People's Organization (SWAPO).

That, in turn, has led to new threats from South Africa to pull out of the U.N. plan. It also has caused South Africa to launch military attacks on SWAPO guerrilla bases in neighboring Angloa and to question publicly the integrity of the United States, its western allies and Secretary General Kurt Waldheim.

The United States has an especially large stake in keeping the plan on course. U.S. diplomats had the leading role in working out the agreement for Namibian independence, and the Carter administration has cited it frequently as a potential model for the peaceful solution of other racial conflicts in southern Africa.

If this negotiating effort is derailed, the hit-and-run guerrilla warfare now going on there could escalate dangerously as black African countries are drawn into more direct military support of SWAPO. At the same time, the United States and its allies would come under intensified pressure from black Africa to move against South Africa with economic boycotts and other sanctions.

Namibia, a sparsely populated but mineral-rich territory on South African's northwestern border, has been ruled by Pretoria for 60 years under an old League of Nations mandate. The plan to give its predominantly black population independence from white-dominated South Africa was approved by the U.n. s/ecurity Council last july with the tentative agreement of South Africa and SWAPO.

If things had gone according to schedule, a U.N. force would have arrived there last weekend to oversee a cease-fire and supervise the elections. But that timetable was blocked by South Africa's objection to parts of Waldheim's proposals for putting the U.N. force in place.

Specifically, South Africa contends that Waldheim wants to allow a SWAPO guerrilla base inside Namibia and has not made provision for monitoring SWAPO forces in neighboring countries. As a result, South Africa contends that SWAPO, which Pretoria regards as communist-controlled, will be able to use its military power to intimidate voters and influence the elections.

South Africa's anger at this alleged failure to curb SWAPO led Prime Minister Pieter W. Botha to publicly attack Waldheim and the western governments Waldheim and the western governments last week and to order attacks on the SWAPO bases in Angola and Zambia. The Zambia government charged yesterday that at least nine people were killed and 14 wounded in what it called South Africa's "indiscriminate bombing."

U.S. officials said yesterday they hope the New York meeting will be attended by South African Foreign Minister Pik Obtha and SWAPO leader Sam Nujoma. Also invited, the officials added, were foreign ministers of six black African countries -- Nigeria, Angola, Zambia. Tanzania, Botswana and Mozambique -- and of the five western countries that initiated the independence plan -- the United States, Canada, Britian, France and West Germany.