But Mandela's coziness with Libya and other pariah states such as Syria, Cuba and Iran is nothing if not consistent. Though the relationships are often of little strategic value to South Africa, he is unfailingly loyal to those people and governments that demonstrated commitment to the anti-apartheid movement during his 27 years in prison.
``Libya was one of those countries that supported us during our struggle when others were working with the apartheid regime,'' he said before leaving on his trip.
Libya, suffering from U.N. sanctions because of Gadhafi's refusal to extradite two nationals suspected of bombing a Pan Am jet over Scotland in 1988, killing 270 people, clearly understood the importance of a visit from someone of Mandela's stature:
``Mandela's trip to Libya is a devastating blow to America,'' read one of the banners welcoming Mandela to Tripoli.
Mandela's visit was front-page news in South Africa, where it played well for a domestic audience of ANC stalwarts, many of them trained by communist governments, who are uncomfortable with the increasingly capitalist bent of Mandela's government. The visit appealed to them as a gesture of solidarity with the developing world and an act of defiance against the overbearing United States.
His bestowal of the Order of Good Hope on Gadhafi raised some hackles among white opposition politicians, who said the act was an embarrassment to South Africa and could seriously harm investor confidence.
Democratic Party leader Tony Leon, whose liberal party is dominated by white English-speaking suburbanites, said the award was also a slap at British royalty, who Gadhafi has implied conspired to kill Princess Diana because she was dating an Arab.
But even those remarks failed to trigger an upwelling of opposition among whites against Mandela.
``The issue is really a low priority for most South Africans, black or white,'' said Bill Sass, an analyst for the Institute for Security Studies, an independent think tank in Johannesburg.
Ironically, Libya's contribution to the liberation struggle was not particularly significant. Some ANC guerrillas trained as urban commandos in Libya, but most ANC apparatchiks got their military training in Eastern Europe or the Soviet Union, Sass said.
But Mandela does not engage in the traditional system of point-scoring, doling out support on the basis of who can return the greatest number of favors. With Mandela, those who lent unquestioning support can do no wrong.
``He's extraordinarily difficult to budge on this,'' said Steven Friedman, director of the Center for Policy Studies.
Such a system of rewarding loyalists - and penalizing those who demonstrate individualism - is clearly evident in South African domestic affairs.
Mandela has refused to punish or fire several ANC officials who have demonstrated obvious incompetence or corruption - as long as they remain uncritical of the ANC. His government continues to support Allan Boesak, the ANC's former Cape Town chief, who is accused of absconding with $2 million in foreign development aid. But the ANC kicked out another politician, Bantu Holomisa, after he publicly accused the party of tolerating corruption.
The president's ex-wife is another example: Winnie Madikizela-Mandela was not drummed out of the government when she was convicted of assault or suspected of defrauding the government, or when newspapers publicized her extramarital dalliances. She lost her job after she publicly criticized the ANC cabinet.
But Mandela's trip may have been more than a show of loyalty for an old friend.
He appears to be intent on using his power to broker a major international peace deal as his time in power winds down - he is 79 and plans to step down as head of the ANC next month; his term as president ends in 1999.
This year, he has injected himself into disputes in Sumatra, Sudan and Congo (the former Zaire). And now Libya.
Mandela indicated he wants to help resolve the dispute that has isolated Libya since sanctions were imposed in 1992. He endorsed Libya's call to extradite the two plane-bombing suspects to a country other than Britain or the United States.
Mandela's motive appears to be his belief that there's nothing that cannot be negotiated, a view supported by his own experience getting the South African government to talk itself out of power.
This is clearly at odds with the U.S. position to isolate Libya until it relents. But Washington's muted criticism indicates its willingness to grant a greater degree of tolerance to a person as widely revered as Mandela.
``At senior political and diplomatic levels, it's understood that Mandela's actions are an irritant, but they won't blow the relationship,'' said Friedman.