TO UNDERSTAND how far South Africa has strayed from Nelson Mandela’s legacy, one need only peruse the latest foreign-policy paper drafted by grandees of the ruling African National Congress (ANC). The fall of the Berlin Wall, it reads, marked not the freeing of captive nations in Europe but a regrettable triumph of Western imperialism. The pro-democracy protests in Tiananmen Square in China were an American-backed counter-revolution. Russia’s invasion of eastern Ukraine is a conflict “directed from Washington”. America’s policies in Africa and the Middle East have “the sole intention” of toppling democratic governments. As “part of the international revolutionary movement to liberate humanity from the bondage of imperialism”, South Africa should seek to have American military bases thrown out of Africa.

If this were a spoof, it might be amusing. Yet the document is entirely serious: its contents are to be debated at the ANC’s policy conference in October. Its authors include several serving and retired cabinet ministers, including a former foreign minister. South Africa risks becoming a laughing-stock, not least in Africa itself.

When Mandela became South Africa’s first post-apartheid president, he led the country out of isolation. He promised a foreign policy in which “human rights will be the light that guides”. Granted, he and his successor, Thabo Mbeki, applied the principle inconsistently. South Africa called for sanctions against Sani Abacha, Nigeria’s brutal dictator, and was a vocal advocate of the International Criminal Court (ICC). Yet it also coddled dictators such as Muammar Qaddafi, whom Mandela called “my brother leader”, propped up Robert Mugabe even as he led Zimbabwe to ruin, and sided with Russia and China in opposing sanctions on Myanmar.

Dalai Lama, no. Bloodstained despot, yes

Under Jacob Zuma, the current president, the country’s foreign policy has drifted even further from its previous ideals. When the Dalai Lama was invited to attend a meeting of Nobel peace laureates in South Africa, the government refused him a visa. Yet it welcomed Omar al-Bashir, the president of Sudan, despite his indictment by the ICC for orchestrating genocide and mass rape in Darfur. And rather than let a fellow African leader face such impertinent charges, Mr Zuma’s officials whisked him away just before a South African court ordered his arrest.

All countries struggle to balance principles and national interests. Yet South Africa’s revolutionary foreign policy serves neither. On principles: South Africans may be grateful for the Soviet Union’s opposition to apartheid, but they are also proud of their constitutionally guaranteed human rights. Few buy the ANC’s argument that Vladimir Putin’s Russia is a victim and Barack Obama its cruel oppressor.

What about self-interest? The ANC wants to draw closer to the BRICS, a club that also includes Brazil, Russia, India and China and seeks to create an alternative world economic force. Fair enough; trade with China, especially, is important. Yet Europe is still South Africa’s biggest trading partner, and America, which gives South African textiles and manufactured goods preferential access to its markets, comes third. The ANC seems to think that commerce with China will flourish only if South Africa is hostile to the West. This is nonsense: many countries trade profitably with China while staying close to America.

The ANC thinks South Africa should stand up for Africa. But Europe and America are not Africa’s enemies. Quite the opposite. A single American aid programme, the President’s Emergency Plan for AIDS Relief, has saved millions of African lives. None of the BRICs can make similar claims. Nor did they step up—as Western countries did with soldiers, equipment and intelligence—when jihadist militias almost overran Mali or the north of Nigeria.

South Africa’s peaceful transition to democracy offered hope to a continent long tormented by despots and ideologues. If the ANC now rejects South Africa’s liberal friends and throws in its lot with some of the world’s nastier regimes, it will be doing Africans a grave disservice.