IT WAS a foregone conclusion that the United States, with its allies, would veto new U.N. resolutions demaning sanctions against South Africa for dragging out independence for Namibia. Since such sanctions would devastate various African nations with economic links with Pretoria, the call for them had to be seen mostly as a way to dramatize African commitment to a free Namibia. The Reagan administration, having just lifted an old sanction against an adversary, could not have embraced new ones against a state it regards as a friend. The administration believes, moreover, that sanctions will simply stiffen South Africa further in the Namibia negotiations to come.

Okay. But having vetoed sanctions partly to expedite negotations, the administration comes under a fresh obligation to perform. The South African government had waited for Mr. Reagan to see if he could win it better terms. He is promising just that, including Zimbabwe-like constituional guarantees to protect Namibia's white minority against its specter of a SWAPO electoral sweep. Surely the administration will use its full influence to deliver South Africa to terms redrafted for its comfort.

But why, then, has the State Department warned that the United States may abandon its negotiating effort if there are not realistic prospects of success? In one sense this was a call to the "front-line" states to help out. But it could also be read as a veiled invitation to South Africa to resist. That reading should not be allowed to stand.

In this regard, the results of the recent elections among the ruling white minority in South Africa are relevant. Prime Minister P. W. Botha's governing National Party won reelection but suffered incursions from both right and left. Earlier doubts about South Africa's strength and determination to move toward reform internally and coexistence externally are bound to grow. Inevitably it will be asked if South Africa still meets the test -- that it be making "a sincere and honest effort . . . to remove apartheid" -- that President Reagan set for American friendship. At the least it means for American diplomacy on Namibia that the United States will have to be very firm in the way.

The United States will also have to take care not to raise an unnecessary barrier in Namibia by demanding a prior departure of Cuban troops from Angola. Those troops are there for two purposes -- to protect the Angolan government against South African forces punishing Angola for harboring SWAPO guerrillas, and to protect that government against its own guerrilla challengers. It is necessary that the Cubans depart: No African should accept that 20,000 foreign troops come from across an ocean to aid one side in an internal struggle for power. But all Africans accept that an African government under constant assault by South Africa, as Angola has been, will seek help where it can. Its foreign minister recently affirmed that Angola will send the Cubans home "when Namibia will be independent, and the aggression againt Angola from South Africa finished." This is the pledge the United States should try to make come true.