World leaders have heaped praise on the late Nelson Mandela, but among the countries paying tribute are some that had long backed the South African apartheid regime that jailed him.
Many of the eulogies for the iconic peacemaker have glossed over Western support for the white supremacist regime in Pretoria during the Cold War, when Mandela and his African National Congress (ANC) were blacklisted as Soviet proxies.
Israel was one of South Africa's closest allies at a time when Pretoria was facing UN-led sanctions, maintaining defence ties which also benefitted an authoritarian anti-communist regime in Taiwan.
Fear of communism prompted Britain's Margaret Thatcher to support the apartheid regime during the 1980s, and Mandela himself was only removed from the US terror watch list in 2008, just days before his 90th birthday.
Eulogising Mandela, Israeli President Shimon Peres described him as a "fighter for human rights who left an indelible mark on the struggle against racism and discrimination."
But during the 1970s and 1980s, when Mandela was serving a 27-year prison sentence, Israel's stance on South Africa was very different.
The Jewish state had initially supported UN sanctions on South Africa, but finding itself increasingly isolated after the 1973 Arab-Israeli War, it cultivated ties with Pretoria -- a process in which Peres was deeply involved, first as defence minister and then as foreign minister.
"As defence minister, Peres was involved," said Yossi Beilin, a former foreign ministry director who worked to distance Israel from apartheid South Africa in the late 1980s.
"Despite the UN resolution in 1977, which was a very clear decision to boycott transfer of weapons or security cooperation with South Africa, Israel did not respect it at all," Beilin told AFP.
Israel's close defence and security cooperation with South Africa, allegedly including development of nuclear weapons, left the Jewish state isolated and nearly cost it crucial US military aid as it flew in the face of UN resolutions sanctioning Pretoria.
"It was a kind of alliance, with a very strong military and security dimension," said Alon Liel, who served as Israel's ambassador to South Africa from 1992-1994 during the final years of apartheid.
"South Africa was completely isolated from 1977 by the UN arms embargo, which we bypassed," Liel said.
A report Wednesday by Haaretz newspaper said South Africa was the Israeli defence industry's "biggest customer" with cooperation peaking in 1988 when Israel sold Pretoria 60 Kfir fighter jets for $1.7 billion.
As Western states refused to sell Pretoria arms, apartheid South Africa became a "captive customer" of Israel's military industry, Haaretz said.
South Africa maintained diplomatic ties with Israel after the end of apartheid, but Mandela emerged as a strong critic of the Israeli occupation, saying in a 1997 speech that "our freedom is incomplete without the freedom of the Palestinians."
In the latest awkward twist to the relationship, Israeli Prime Minister Benjamin Netanyahu reneged on a pledge to attend the memorial, saying the visit would cost too much following a week of bad press over his personal expenses.
Peres was unable to attend because he was recovering from flu, his office said.
The Taiwan connection
Israel's cooperation with Pretoria benefitted another apartheid ally -- authoritarian, anti-communist Taiwan.
Taiwan and South Africa reportedly maintained sanctions-busting trade in weaponry during the apartheid era, with Taipei selling ammunition and small arms to Pretoria in exchange for uranium.
That uranium fed into what historians say was a programme by Taiwan's ruling Kuomintang (KMT) nationalists to develop nuclear weapons with the aid of technology transferred from Israel.
The KMT, whose members had fled the mainland after losing to communist rivals in China's civil war in 1949, found a sympathetic ear in the virulently anti-communist rulers of South Africa.
"The Republic of China (Taiwan) government was trying everything it could to reduce the diplomatic isolation," a former Taiwanese official in charge of cultural and liaison contacts with Pretoria told AFP on condition of anonymity.
Mandela seen as 'terrorist' in US, Britain
In Washington and London, Mandela and his ANC were long seen as yet another Soviet proxy to be opposed in the name of freedom and democracy, despite the racist policies of the government he sought to overthrow.
Britain's Thatcher, who died earlier this year, refused to support sanctions in the 1980s, denouncing the ANC as "terrorists."
"The fear amongst the political right that the ANC was a pawn of Moscow, and that Mandela was a dangerous figure under the control of the South African Communist Party, was very live during the Cold War," explained Saul Dubow, African history professor at Queen Mary University of London.
"Broad swathes of the Conservative party were careful to disapprove of apartheid ... but this was outweighed by the perception that the South African government was anti-communist and a dependable partner of the Western alliance."
Britain's Conservative Prime Minister David Cameron attended Mandela's memorial on Tuesday, alongside three other former premiers.
Also at Tuesday's memorial was US President Barack Obama, who gave a soaring tribute to Mandela just five years after Washington removed him from its terror watch list.
Until then, Mandela and other ANC members could only enter the country by means of a State Department waiver to attend UN meetings, a situation described as "embarrassing" by former secretary of state Condoleezza Rice.