South African Foreign Minister Pik Botha made a dramatic withdrawal yesterday from talks with five Western foreign ministers on independence for Namibia, saying he was "profoundly disappointed" with the results of the negotiations.

He repeatedly hinted in both a press conference and in a nationwide television interview (Face the Nation-CBS) that South Africa has gone about as far as it can do accommodate the conditions laid out by the United States and its allies to end South African rule in the territory of Southwest Africa (Namibia).

South Africa has said it plans to grant Namibia independence by the end of the year with or without international recognition and a role for the United Nations in the process. Any such unilateral move by South Africa is likely to lead to an escalation in the decade-long guerrilla war there, and Third World pressure to impose some measure of U. N. sanctions on Pretoria, including the possibility of a ban on new investment in South Africa.

Calling the situation "very serious," Botha criticized the West for not "appreciating the situation on the ground" in Namibia, which has a 1,000-mile long border with Angola and where guerrillas of the Southwest Africa People's Organization (SWAPO) have been carrying on the war.

In a stormy television interview, he said the western proposals would lead to an armed takeover by SWAPO and "a total and complete collapse" in the territory, leading to its "being governed by a Marxist terrorist organization," a reference to SWAPO, which South Africa says has Communist links. He told reporters later this would be like putting the terrority "to ash and flame."

SWAPO leader Sam Nujoma, who held another round of talks with western officials, called Botha a "coward" and told reporters "he has run away from the talks." Nujoma added that SWAPO was "ready for both a negotiated solution and ready to continue the armed struggle."

Botha said after two rounds of talks Saturday with Secretary of State Cyrus R. Vance and the foreign ministers of Britain, France, West Germany, and Canada, it became "immediately clear I had to consult with my prime minister," John Vorster. He added that progress was made in some areas and in others the situation was static.

The talks had been scheduled to last two days, with some expectation that they would spill over into Monday.

Botha declined to give details of the problems but said the key issues were: the withdrawal of most of the 20,000 South African troops during a transition period before independence; the size of a U.N. peacekeeping force; and the role of South African and U.N. officials in organizing elections for a constituent assembly.

Western reaction to Botha's remarks were generally relaxed, as opposed to the flurry of activity and meetings by the foreign ministers Saturday night when word leaked out that Botha planned to pull out of the talks.

British Foreign Secretary David Owen told reporters that "the differences over the western plan are not very great. It would be a tragedy if we lost this opportunity to bring Namibia to independence."

State Department spokesman Hodding Carter said that as far as the United States was concerned, "the ball is in south Africa's court. It is up to them; there is nothing the west has to do."

Andrew Young, U.S. ambassador to the United Nations, said both South Africa and SWAPO were "squirming and struggling with the negotiations. That's not failure, that's a sign of success. Nobody likes our positions, and that's evidence they're good."

Botha, in his two press appearances refused to give up hopes for the talks, but frequently voiced his unhappiness at what he regarded as lack of Western appreciation of the moves South Africa has made toward granting Naminia independence.

He cited South Africa's willingness to greatly reduce its troops there during the transition period and to allow U.N. peacekeeping forces and a U.N. supervisory role in the elections, which would be on the basis of one-man, one-vote, unlike South Africa where blacks do not have voting rights.

At varying times, he said, "We've leaned over backward . . . What more can I do . . . If this doesn't carry the day, what hope is there for southern Africa to achieve peace."

Referring to the possibility of U.N. sanctions, he said "If I'm nailed for having done all this, we'll just have to accept it, black and white alike."

He said that aside from consulting with his government, he would be bound by the wishes of the internal tribal factions among 850,000 population in the territory, which is twice the size of California. SWAPO operates outside Namibia, and there is a longstanding debate over whether it or the factions within the country dealing with South Africa would win a free election.

The western proposal, which has not been made public, is said to call for the 20,000 South African troops there to be reduced to about 1,500 to prevent any chance of the military influencing the elections. This would be complemented by a U.N. peace-keeping force of probably twice that size.