The United States, joined by Great Britain, today vetoed a Security Council resolution threatening mandatory sanctions against South Africa but then allowed a measure to pass calling for voluntary steps if Pretoria does not end its week-old state of emergency and free detainees.

The U.S. veto and subsequent acquiescence in a measure that stressed voluntary pressures on South Africa came only hours after the White House for the first time publicly demanded an end to the emergency under which police have detained more than 900 persons.

Presidential spokesman Larry Speakes said Washington was using tougher language because the "continuing violence and bloodshed has not abated and it is clear this is not bringing about the type of results we want or, we assume, the South African government wants." Details, Page A17.

The resolution ultimately adopted, put forward by France, urged nations to voluntarily impose various sanctions against South Africa.

These included the suspension of all future investment and export loans, restrictions on sports and cultural links, and bans on the sale of all South African coins, on new nuclear contracts, and on the sale of computer equipment that could be used by the Army or police.

There were 13 votes in favor of the final text, with Britain and the United States abstaining.

Even without mandatory sanctions, U.N. observers said the resolution that passed marked the strongest antiapartheid measure taken by the council since a mandatory arms embargo against South Africa in 1977.

U.S. representative Warren Clark said Washington "wants the end of the state of emergency in South Africa," and warned that Pretoria "must understand the question is not whether or how apartheid is going to end."

He called for talks between the government and black leaders to establish "a just society," but he said that actions to restrict investment in the country could undermine its economy and "further harm the black majority."

African representatives had argued that only the threat of mandatory sanctions would deter Pretoria and force an end to the apartheid system of racial separation. A number of them denounced the U.S. policy of "constructive engagement" with South Africa.

Privately, they expressed strong resentment at France for seizing an issue they felt to be theirs and submitting a text without prior consultation. The vote was delayed for 24 hours as the African group sought to stiffen the text.

In the end, France proved successful in pushing its proposal through the council with only cosmetic changes -- and without provoking a veto by its closest allies.

France abstained on the African amendment threatening mandatory sanctions.

In advance of the vote, South African Ambassador Kurt von Schirnding had warned that "nothing this council may say or plan will deter us from doing what we believe is in the best interests of all the peoples of South Africa."

The resolution strongly condemned the detentions "and the murders which have been committed" since the institution of the state of emergency in 36 districts on Sunday.

In addition to freedom for those held under the emergency regulations, the council called for the unconditional release of all political prisoners, specifically Nelson Mandela, the black leader who has spent 21 years in prison.

The resolution also affirmed that a solution can be found only through the elimination of apartheid and the establishment of a democratic society on the basis of universal suffrage.

Britain, France and the United States acquiesced on June 19 in a council resolution threatening South Africa with mandatory sanctions if it failed to comply with U.N. terms for the independence of Namibia, a territory it rules. Western diplomats explained that they regarded the Namibia situation as "an unlawful occupation that violates U.N. Charter norms and specific council resolutions." The South African unrest, however, is an internal problem that neither the United States, Britain nor France views as a threat to international peace, they said.