Delegates of the South African and Angolan governments met in the Cape Verde Islands, off West Africa, today to discuss the possible withdrawal of Cuban troops from Angola, a move that could open the way to Namibian independence.

South African Foreign Minister Roelof (Pik) Botha and a 15-man delegation returned to Pretoria tonight. Officials, while confirming the meeting, would give no details. It was the first such meeting officially confirmed to have occurred and reports from Cape Verde said the two sides agreed to meet again.

The United States has mounted a major diplomatic effort, which included a seven-nation African tour by Vice President Bush last month, to break a deadlock in the Namibian independence negotiations.

This impasse involves South African insistence on prior assurances that the estimated 20,000 Cuban troops in Angola will be removed. The United States has supported South Africa on this point.

In Washington, the State Department issued a statement saying, "We welcome these discussions as a positive development which could enhance prospects for a resolution of regional problems. We hope the discussions will help build mutual trust and sufficient confidence to stem the cycle of violence. . .We knew the talks were taking place." A senior U.S. official said the meeting in Cape Verde came at the initiative of the Angolans.

Angolan President Jose Eduardo dos Santos was granted special powers "in view of the grave situation facing the country," according to the official news agency Angop, which said the Marxist ruling party took the decision only hours after the meeting with South Africa. The issue of retaining the Cuban troops has divided the party.

In a parallel development today, South African military commanders repeated a government warning that Cuba may be seeking a pretext to move its troops to Marxist-ruled Mozambique, on South Africa's eastern border, if agreement is reached on withdrawal from Angola.

With a warning from Botha that this would not be tolerated, South Africa flew 18 foreign and local reporters along part of its 280-mile border with Mozambique in an attempt to discredit claims by the Maputo government and Cuban President Fidel Castro that Pretoria is massing troops there. The reporters were taken to the border post at Ressano Garcia, in the region where Castro said South African troops were being massed.

The reporters saw no sign of South African troops near the border and were told it is patrolled only by police. The official Mozambique news agency AIM said South African troops crossed the border Monday, wounding 16 villagers before being forced to retreat. Defense headquarters in Pretoria dismissed the claim tonight as "ludicrous."

Meanwhile, the South African armed forces commander announced that South African troops Thursday attacked black nationalist camps in the capital of the independent kingdom of Lesotho, killing 30 African National Congress insurgents.

Lt. Gen. Constand Viljoen said four South African soldiers were injured in the attack in Maseru and five women and two children had died in crossfire.

He added, "South Africa's government repeatedly warned governments of all neighboring countries not to allow terrorists to use their territories and facilities as springboards against South Africa."

South Africa's meeting with Angola was not the first between the two countries. There have been several unofficial meetings, but this first publicly acknowledged one is understood to have resulted from a meeting last month of the five Portuguese-speaking African states--Angola, Mozambique, Guinea-Bissau, Cape Verde and Sao Tome and Principe.

According to informants in Pretoria, the initiative was taken by Cape Verde President Aristides Pereira, who allows transatlantic landings to South African and Angolan flights on the island of Ilho del Sol, about 400 miles off the coast of Senegal. The meeting reportedly took place in the South African airline terminal there.

South Africa's delegation included the defense minister, Gen. Magnus Malan. The two Angolan officials were said unofficially in Pretoria to have been Lt. Col. Alexandre Rodrigues, interior minister and a member of the ruling party's politburo, and Transport Minister Faustino Muteka.

Angop, the Angolan news agency, reported that the meeting was to discuss a simultaneous withdrawal by the Cubans from Angola and South Africans from Namibia, creating a demilitarized zone.

On his return from talks in Washington with Secretary of State George P. Shultz last month, Botha said South Africa would agree to a phased simultaneous withdrawal if 1,500 South African troops remained in Namibia -- also known as South-West Africa -- as agreed in a U.N. Security Council resolution passed at an earlier stage.

Another matter almost certainly discussed, in the view of observers here, was Jonas Savimbi's rebel Unita movement, which controls a large part of southern Angola and is widely believed to receive logistical support from South Africa.

Keeping Unita from advancing farther north is one of the main tasks of the Cubans. Botha said earlier that he did not believe there could be an agreement on Namibia "unless the issue of Savimbi is addressed in some way."

A sensitive issue for South Africa is the presence in Angola of leftist guerrillas of the South-West Africa People's Organization, which is fighting an intermittent war for the independence of the territory.

The United States, which is spearheading the search for a resolution in Namibia, is part of a Western "Contact Group," including Canada, Britain, France and West Germany, trying to negotiate a settlement in the territory that South Africa controls in violation of U.N. calls for independence.