While the American news media recently focused on “the handshake” between President Obama and Raúl Castro, it is worth pondering why the organizers of Nelson Mandela’s memorial service invited Raúl Castro to be one of only six foreign leaders—of the ninety-one in attendance—to speak at the ceremony. Not only was Raúl Castro accorded that honor, but he also received by far the warmest introduction: "We now will get an address from a tiny island, an island of people who liberated us ... the people of Cuba," the chairperson of the African National Congress (ANC) said. Such words echo what Mandela himself said when he visited Cuba in 1991: “We come here with a sense of the great debt that is owed the people of Cuba ... What other country can point to a record of greater selflessness than Cuba has displayed in its relations to Africa?”

Many factors led to the demise of apartheid. The white South African government was defeated not just by the power of Mandela, the courage of the South African people, or the worldwide movement to impose sanctions. It was also brought down by the defeat of the South African military in Angola. This explains the prominence of Raúl Castro at the memorial service: it was Cuban troops that humiliated the South African army. In the 1970s and 1980s, Cuba changed the course of history in southern Africa despite the best efforts of the United States to prevent it.

In October 1975, the South Africans, encouraged by the Gerald Ford administration, invaded Angola to crush the leftwing Popular Movement for the Liberation of Angola (MPLA). They would have succeeded had not 36,000 Cuban soldiers suddenly poured into Angola.

By April 1976, the Cubans had pushed the South Africans out.

As the CIA noted, Castro had not consulted Moscow before sending his troops (as is clear from later tense meetings with the Soviet leadership in the 1980s.) The Cubans, Kissinger confirmed in his memoirs, had confronted the Soviets with a fait accompli. Fidel Castro understood that the victory of Pretoria (with Washington in the wings) would have tightened the grip of white domination over the people of southern Africa. It was a defining moment: Castro sent troops to Angola because of his commitment to what he has called “the most beautiful cause,” the struggle against apartheid. As Kissinger observed later, Castro “was probably the most genuine revolutionary leader then in power.”

The tidal wave unleashed by the Cuban victory in Angola washed over South Africa. “Black Africa is riding the crest of a wave generated by the Cuban success in Angola,” noted the World, South Africa’s major black newspaper. “Black Africa is tasting the heady wine of the possibility of realizing the dream of total liberation.” Mandela later recalled hearing about the Cuban victory in Angola while he was incarcerated on Robben Island. “I was in prison when I first heard of the massive aid that the internationalist Cuban troops were giving to the people of Angola. ... We in Africa are accustomed to being the victims of countries that want to grab our territory or subvert our sovereignty. In all the history of Africa this is the only time a foreign people has risen up to defend one of our countries.”

Pretoria, however, had not given up: even after retreating from the Cubans, it hoped to topple Angola's MPLA government. Cuban troops remained in Angola to protect it from another South African invasion. Even the CIA conceded that they were “necessary to preserve Angolan independence.” In addition, the Cubans trained ANC guerrillas as well as SWAPO rebels, who were fighting for the independence of Namibia from the South Africans who illegally occupied it.

From 1981 to 1987, the South Africans launched bruising invasions of southern Angola. It was a stalemate—until November 1987, when Castro decided to push the South Africans out of the country once and for all. His decision was triggered by the fact that the South African army had cornered the best units of the Angolan army in the southern Angolan town of Cuito Cuanavale. And his decision was made possible by the Iran Contra scandal rocking Washington. Until the Iran-Contra scandal exploded in late 1986, weakening and distracting the Reagan administration, the Cubans had feared that the United States might launch an attack on their homeland. They had therefore been unwilling to deplete their stocks of weapons. But Iran Contra defanged Reagan, and freed Castro to send Cuba's best planes, pilots, and antiaircraft weapons to Angola. His strategy was to break the South African offensive against Cuito Cuanavale in the southeast and then attack in the southwest, “like a boxer who with his left hand blocks the blow and with his right—strikes.”

On March 23, 1988, the South Africans launched their last major attack against Cuito Cuanavale. It was an abject failure. The US Joint Chiefs of Staff noted, “The war in Angola has taken a dramatic and—as far as the South Africans are concerned—an undesirable turn.”

The Cubans' left hand had blocked the South African blow while their right hand was preparing to strike: powerful Cuban columns were moving towards the Namibian border, pushing the South Africans back. Cuban MIG-23s began to fly over northern Namibia. US and South African documents prove that the Cubans gained the upper hand in Angola. The Cubans demanded that Pretoria withdraw unconditionally from Angola and allow UN-supervised elections in Namibia. The US Joint Chiefs of Staff warned that if South Africa refused, the Cubans were in a position “to launch a well-supported offensive into Namibia.” The South Africans acknowledged their dilemma: if they refused the Cuban demands, they ran “the very real risk of becoming involved in a full-scale conventional war with the Cubans, the results of which are potentially disastrous.” The South African military was grim: “We must do the utmost to avoid a confrontation.”

Pretoria capitulated. It accepted the Cubans’ demands and withdrew unconditionally from Angola and agreed to UN supervised elections in Namibia, which SWAPO won.

The Cuban victory reverberated beyond Namibia and Angola. In the words of Nelson Mandela, the Cuban victory “destroyed the myth of the invincibility of the white oppressor ... [and] inspired the fighting masses of South Africa ... Cuito Cuanavale was the turning point for the liberation of our continent—and of my people—from the scourge of apartheid.”

Piero Gleijeses is a professor of American foreign policy at the Johns Hopkins School of Advanced International Studies. All quotes from the above article are drawn from his latest book: Visions of Freedom: Havana, Washington, Pretoria and the Struggle for Southern Africa, 1976-1991, The University of North Carolina Press, 2013.

Image: Flickr/Marcelo Montecino. CC BY-SA 2.0.