Thousands of dancing, waving Angolans gave a festive send-off Tuesday to 450 Cuban troops, the first to leave under a U.S.-brokered pact promising the most important withdrawal from southern Africa since World War II.

Scores of foreign observers and dignitaries, including high-ranking Cuban officers, attended the carefully staged extravaganza of ceremonies and parades, the second in as many days.The Cuban contingent made its way to the airport through a cheering crowd and boarded three transport planes, taking off shortly after noon for the long flight home to a promised heroes' welcome in Havana.

An eight-member U.N. inspection team counted them as they boarded the plane.

"You have fulfilled your international role," said President Jose Eduardo dos Santos, whose socialist government has enjoyed 13 years of Cuban support against an entrenched anti-communist insurgency backed with South African troops and American money.

"The friendship of the Angolan and Cuban peoples is unforgettable and indestructible," dos Santos said.

Tens of thousands of people flooded the streets of the capital, carrying flags and pictures of Cuban leader Fidel Castro as they danced past a reviewing stand packed with Cuban generals, Angolan leaders and diplomats.

The departing soldiers - men and women from all branches of the Cuban force - shouted and waved back to the crowd as they marched past, decked out in an array of new campaign medals.

The Cubans must withdraw 3,000 troops by April 1 and the rest of their 50,000-member force by mid-1991 under the terms of a U.S.-brokered accord providing an end to South African interference in Angola and independence for neighboring Namibia.

Observers see the pullout as possibly the most important military development in southern Africa in more than four decades, with the capacity to significantly alter the balance of power in the region.

In Johannesburg, the state-run South African Broadcasting Corp. welcomed the withdrawal but warned there can only be peace in the region if the parties honor all aspects of the agreement, which also requires Angola to end its support for anti-South African guerrillas.

In Lusaka, Zambia, the African National Congress announced it will close its guerrilla bases in Angola in support of the agreements.