The U.N. Security Council yesterday unanimously condemned South Africa's armed raid deep inside Angola and warned that any further such attacks could lead to punitive measures.

The United States joined in voting for the consures as Angola announced that more than 600 persons were killed and 420 were injured in Thursday's air and ground attack by South African forces.

A South African Defense Ministry spoksman in Pretotia, meanwhile, charged that terrorists continued to fire across the border from Angola on South African positions in Namibia, and warned, that "if they continue with this kind of thing, we shall have to act again."

The South African raid 150 miles deep into Angola was virtually certain to further complicate current diplomatic efforts to arrange for independence of Namibia (Southwest Africa) by the end of this year.

The South African government said its forces directed their attack against South West African People's Prganization (SWAPO) headquarters at the Angolan town of Cassinga. It said SWAPO guerrillas suffered "severe" casualties while five South African soldiers were killed.

A SWAPO statement issued in Lusaka, Zambia, said an unspecified number of women and children were killed and wounded in the raid. Angola's Defense Minister Iko Carreira said most of the victims were women, children and old people who had fled from Namibia to Angola. He added that there were some Angolan soldiers among the more than 600 dead and 420 wounded.

The raid came on the eve of the scheduled talks this weekend in New York between SWAPO officials and representatives of five Western members of the Security Council.

South Africa has administered Southwest Africa for the past 58 years under an old League of Nations mandate. That mandate was revoked by the United Nations in 1966. SWAPO opposes South African's continued administration of the territory.

The scheduled talks at the United Nations were designed to resolve some "outstanding issues" in the plan for Namibia's independence.

The plan proposed by the United States and four other Western countries, call for a ceasefire, a phased withdrawal of South African troops from the territory, and for U.N. supervised elections leading to Namibia's independence by the end of the year.

While South Arfica has announced the acceptance of the Western plan on Namibia, the massive armed attack on SWAPO headquarters at this time has led to speculations that the raid was designed to disrupt the Namibian diplomacy.

South Africa denied this. In a message to the five Western members of the Security Council yesterday, South Africa said SWAPO cannot be allowed to follow a dual strategy - appearing to negotiate for peace while "continuing brutal acts of violence and terror" in Namibia.

Despite African anger over the raid, talks on the Western plan for Namibia's independence were expected to resume next week.

The Security Council resolution, introduced late Friday after reports of heavy civilian casualties caused in the Angolan raid, "strongly condemns this latest armed invasion," It called it a "flagrant violation" of Angolan sovereignty and demanded "the immediate and unconditional withdrawal of all South African forces from Angola."

It said a repetition of such attacks would require the council to consider punitive measures.

Ambassador John Leonard, deputy to Andrew Young, the cheif U.S. delegate to the United Nations, called the South African raid "senseless."

This was, he said, "a serious escalation of the level of conflict at precisely the time when South Africa, above all others, should be demonstrating its desire for peace."

After yesterday's vote, Angola's Ambassador Elisio de Figueiredo said "racist South African troops are still in my country."

South Africa said it withdrew all its forces after the attack. It said that in addition to SWAPO headquarters, a second SWAPO base just inside Angola was hit and prisoners taken.

Mirage jets, tanks, helicopters, paratroopers andinfantry were deployed during the six-hour-long attack.