South African Foreign Minister Pik Botha flew to Washington unexpectedly yesterday amid growing signs that Secretary of State Cyrus R. Vance's efforts to persuade South Africa to accept a compromise plan for the disputed territory of Namibia and avoid a showdown at the United Nations have failed thus far.

Botha reportedly is seeking an urgent meeting today with Vance to continue a discussion the two diplomats began at the United Nations Monday on Namiba, largely a desert territory also known as South West Africa that was turned over to South African rule under a League of Nations mandate in 1920.

State Department spokesman Hodding Carter declined comment on Botha's sudden trip from New York, and other State Department official said the requested meeting was being handled "on a hush-hush basis." These officials could offer no explanation for the secrecy.

A South African embassy spokesman confirmed that Botha had arrived in Washington but said he did not know the purpose of the visit.

Informed diplomatic sources reported that Vance and U.N. Secretary General Kurt Waldheim both failed in their meetings with Botha in New ments on two key points that could persuade African nations to hold off on calls for economic sanctions against South Africa.

Botha had a general discussion with Vance on Monday and then consulted Pretoria on specific aspects of the U.N. plan for Namibian elections.

South Africa has unilaterally scheduled an election for legislative body in the territory on Dec. 4. The United Nations has denounced those elections as illegal and is trying to get the South Africans to disavow the local governing body that will emerge from them and to accept a U.N. peacekeeping and election supervision force for elections next year.

In reporting back to the five-nation contact group that has been negotiating with the South Africans and to Waldheim, Botha said that he could not agree to a date for the initial arrival of the proposed U.N. force in Namibia, according to diplomatic sources.

He also was vague on what South Africa's relationship with the local governing body would be, reportedly promising only that the South Africans would recommend "to the parties concerned" that they consider the U.N. plan.

Vance was one of the foreign ministers in the contact group, which includes Britain, Canada, France, West Germany and the United States, who went on a mission to Pretoria in October in an effort to get South Africa to call off the Dec. 4 elections.

Since the failure of that mission, the western countries have been successful in getting African and nonaligned nations pressing for economic sanctions against South Africa to hold off U.N. Security Council action while the western nations continue to test South African intentions on Namibia.

Their ability to avoid a Security Council vote has been seriously weakened by Botha's responses this week, according to diplomatic sources. The U.N. representatives of the contact group met until 1 a.m. yesterday and reportedly agreed that the South African response would not be satisfactory to the Security Council.

Botha is due to return to South Africa after seeing Vance and any new response would not reach Waldheim until Sunday or Monday. Security Council action is not likely to come before next week.