BRAZZAVILLE, CONGO, DEC. 13 -- South Africa, Angola and Cuba today signed a historic agreement committing themselves to the phased withdrawal of 50,000 Cuban troops from Angola over the next 27 months in return for the independence of Namibia by next Oct. 1.

Namibia, often called "the last colony in Africa," has been occupied and administered by South Africa for 73 years.

Culminating nearly eight years of mediating efforts by the United States to bring peace to the region of southern Africa, the agreement was hailed by the signatories as heralding a "new era" of peace in a subcontinent riven by conflicts between superpower surrogates.

"This event signifies the end of a sad chapter in Africa's modern history and the beginning of a new chapter," said the U.S. mediator, Assistant Secretary of State Chester A. Crocker.

Referring to the crucial roles played by the United States and the Soviet Union, Crocker added: "It has been a case study of superpower effort to support the resolutions of regional conflicts."

The complex agreement, called the "Brazzaville Protocol," opened the way for a largely ceremonial signing of a formal treaty in New York on Dec. 22 that is to pull together all the peace principles hammered out by the participants since May, including a mechanism for verifying the Cuban troop withdrawal.

The New York treaty will also formally bring the U.N. Security Council into the process through the 1978 U.N. resolution calling for South Africa's withdrawal from Namibia, the former German colony also known as South West Africa.

The timetable for the Cuban withdrawal, which was agreed upon in Geneva, Switzerland, on Nov. 15, was not released with today's agreement, and U.S. officials refused to disclose its contents.

However, South African Foreign Minister Roelof F. Botha, briefing reporters on a flight from Johannesburg, spelled it out in detail:

At least 3,000 of the Cuban troops -- who have been in Soviet-backed Angola since it won independence from Portugal in 1975 -- will begin leaving on April 1, which is when a seven-month-long, U.N.-supervised election process for Namibia's independence is to begin.

Four months later, all Cuban forces in southern Angola will be withdrawn north of the 15th Parallel. That parallel is about 190 miles north of the Namibian border.

By Oct. 1, when Namibian elections will be held, the Cubans will have moved north of the 13th Parallel, about 350 miles north of the border.

By then, half of the Cuban troops will be out of Angola.

By April 1, 1990, two-thirds of the Cubans will be out of Angola, and six months later, 38,000, or three-quarters, will have left.

By July 1991, or 27 months after the start of the process, all Cuban forces will have been removed from Angola, according to the timetable released by Botha.

Within three months after the April 1 trigger date for the independence process, South Africa will have reduced its estimated 50,000 troops in Namibia, including territorial forces, to 1,500 troops garrisoned at Grootfontein and Otjiwarango, located between the capital of Windhoek and the Angolan border.

On Dec. 22 in New York, Angola and Cuba will present to U.N. Secretary General Javier Perez de Cuellar a withdrawal verification mechanism.

With the signing of the formal tripartheid treaty, Perez de Cuellar will introduce to the Security Council an enabling resolution for the deployment of U.N. peace-keeping forces to supervise the Namibian independent elections and assist in monitoring the Cuban troop withdrawals from Angola.

Today's agreement provides that the United States and the Soviet Union will participate as observers in a joint commission of appeals, which will be created a month after the New York signing and which will settle disputes over the South African-Angolan-Cuban agreement. Upon gaining independence, Namibia will become a full member of the appeals commission.

The signing took place in the palace of Congolese President Denis Sassou Nguesso.

The 10th formal negotiating session since last May had broken up unexpectedly on Dec. 3, when the South African delegation said it had to return to Pretoria to consult with the Cabinet.

A senior U.S. official with the negotiating delegation said the South African hesitancy in that session stemmed not so much from a dispute over the verification mechanism as it did from the delegation's lack of a clear mandate from the Cabinet in Pretoria.

South Africa has not been formally involved in the negotiations over verification, which have been drafted bilaterally by Angola and Cuba.

Not even mentioned in today's agreements was the Union for the Total Independence of Angola (UNITA), the U.S.- and South African-backed anticommunist guerrilla force headed by Jonas Savimbi, which has waged a debilitating civil war against the Angolan government and which controls more than a third of the country.

The parties to the agreement have accepted that the question of UNITA and national reconciliation for Angola is an internal matter and will not be part of the negotiations, even though the United States and South Africa have said they will continue to support Savimbi.

A senior U.S. official involved in the talks tonight indicated that it is the Reagan administration's hope that after the Cubans withdraw entirely, reconciliation between UNITA and the Angolan government and Luanda will naturally follow.

"Military solutions have been tried many times and have failed. What this agreement does is address the international question of foreign troops. That should encourage the parties {UNITA and Angola} to explore internal solutions," said the U.S. official, who spoke on the condition that he not be identified.

"We are not going to make our relations with UNITA a bargaining chip in these international agreements. We are not going to disengage from the situation when the other side {Angola, Cuba and the Soviet Union} is still engaged in a very large scale," the official added.

He said if the present rate of Soviet military aid to the Angolan Army continues until the end of this year, it will reach $1.5 billion.

After the signing, Botha and South African Defense Minister Magnus Malan walked over to the Cuban and Angolan delegation and warmly shook hands. Later, they chatted at a cocktail reception hosted by the Congolese before the delegations boarded planes and returned their capitals.

For 13 years, South Africa has been embroiled in a civil war in Angola that has gradually become costly in terms of money and human lives and unpopular at home.

However, last night, in an interview, Crocker said he thought the prospects of peace and economic stability throughout the southern Africa region had been the principal motivating factor in South Africa's decision to leave Namibia.

"I think it is wrong to say that South Africa became persuaded because of its inferior military position. It is more accurate to say that anything has its price, and they are willing to pay the price if everyone is willing to do it," Crocker said.

Botha, in a speech, called the pact "fundamentally an African agreement," and repeatedly referred to the "brotherhood" of Africans, both black and white.

"Southern Africa is like a zebra, you cannot put a bullet in the white stripe and think that the animal will not die," the foreign minister said.

To the sustained applause of a large delegation of Congolese officials, he added: "A new era has begun. My government is removing racial discrimination . . . we want to be accepted by our African brothers. We need each other."

Anatoly Adamishin, the Soviet deputy foreign minister for African affairs who attended a number of the talks, praised the "brilliant role" played by Crocker in mediating the settlement, and said he recognized "the reasonable position finally adopted by South Africa."

Later, in a press conference, Adamishin acknowledged that he and other Soviet representatives had talked with the South Africans at a number of the negotiating sessions.

But said he would not presume to think that they had influenced Pretoria's acceptance of the agreement.

Adamishin referred to the shift in Soviet foreign policy that has emphasized locally negotiated resolutions of regional conflicts, and added, "All this couldn't pass unobserved in South Africa as well."

He was then asked whether Moscow would advise the South West Africa People's Organization (SWAPO), the guerrilla force the Soviet Union has backed in a struggle for Namibian independence, on the formation of a new political and economic order in Namibia.

Adamishin replied, "I personally don't think they are going to build socialism in this part of the world."

He added: "There are few people in the Soviet Union who would advise them to build a socialist society in these particular conditions of Africa.

"Everybody has to deal with realities, and one of the realities is that Namibia has very strong ties to South Africa."

He was referring to Namibia's economic dependence on South Africa, in part through the territory's only seaport, Walvis Bay, which Pretoria has vowed to retain, and its only rail links to the rest of southern Africa.