The militant nationalists of Namibia (Southwest Africa) have agreed to resume talks broken off with the five western powers in early May on their plan to end the conflict with South Africa.

In addition, the five African front line states have empowered Tanzanian president Julius Nyerere to work with the Western states to resolve differences.

This decision, taken at a summit meeting of the five African countries in the Angolan capital of Luanda, was regarded here as a step that could help achieve a negotiated settlement and avert an all-out armed struggle that might increase Soviet and Cuban involvement in the conflict.

The Namibian nationalists' agreement to resume negotiations comes just days before South Africa was scheduled to announce the first steps in its own plan for a settlement.

While South Africa has accepted the Western peace plan, the Namibian nationalist group, the Southwest African People's Organization (SWAPO), has not and had broken off negotiations with the five powers after a South African raid on a Namibian refugee and guerrilla camp in southern Angola.

There was no indictation in the summit's final communique where or when any new talks would be held Nor was it known if the Western powers would agree to reopen negotiations.

Whether South Africa will agree to reopen negotiations - as SWAPO is in effect demanding - remains to be seen. It has been administering the former German colony under an old League of Nations mandate.

At the end of the two-day summit meeting yesterday SWAPO, while declaring its willingness to continue negotiations, said it would nonetheless intensify its armed struggle to oust South Africa and Namibia.

Attending the meeting were presidents Nyerere, Agostinho Neto of Angola and Kenneth Kaunda of Zambia plus Mozambique's planning minister, Marcelino dos Santos and Botswana's vice president, Quet Masire. Also present was Sam Nujoma, Swapo president.

The African states delegated Nyerere to work with the West on the two main obstacles to settlement: the status of Walvis Bay, Namibia's main port, and the location of South African troops during the interim period leading up to elections.

Pretoria claims Walvis Bay has separate status from the rest of Namibia and legally belongs to South Africa.

The summit communique did not insist on the handing over of Walvis Bay as a precondition for a settlement. Observers here felt that this indicated there was a good chance Swapo would go along with some kind of Western statement in principle regarding the inclusion of Walvis Bay in Namibia. One of the outstanding issues could be resolved in this way.

As for the location of South African troops, SWAPO wants all 1,500 confined to one base in southern Namibia. South Africa has been insisting they remain in the north. Western sources here said that a compromise should be possible whereby the troops would go to camps in central Namibia.

Some reports here say SWAPO is ready to accept this compromise.

There was no mention in the summit communique of any other unresolved issues. A SWAPO spokesman here said, however, "Obviously we are thinking about all the outstanding issues, which are not less than four."

In addition to Walvis Bay and the location of the South African forces, he listed the strengthening of the powers of the U.N. representative assigned to assist the South African administrator during the interim period and a stronger U.N. presence in the policing of the territory.

Meanwhile, it was learned here that the U.S. government has sent a special message to President Nyerere assuring him that there has been no fundamental change in American policy toward Africa.

The message was delivered here in Lusaka as he was stopping over on his way to the Luanda meeting. It was in reply to Nyerere's sharp criticism Thursday of the Western-initiated Pan-African force for Zaire and of President Carter's repeated attacks on Cuban involvement in Afirca.

On Saturday, Zamibia became the third frontline state after Angola and Tanzania to voice strong opposition to the pan-African security force in its existing form. Foreign Minister Siteke Mwale said it was an idea of Western countries with vested interests in Africa and that Zamibia would not support it unless such a force was established under the jurisdiction of the Organization of African Unity.