UN chief Ban Ki-moon persuaded Malawi's president to pardon a gay couple jailed for holding a wedding, but his call to reform anti-gay laws poses a challenge to most of Africa.
Ban repeatedly praised President Bingu wa Mutharika for his "courageous" decision to pardon the two men sentenced this month to 14 years' hard labour after a sodomy conviction over their wedding.
While Mutharika said he would free Tiwonge Chimbalanga, 20, and his partner 26-year-old partner Steven Monjeza, he also made clear his disapproval.
But Ban framed the issue as an international human rights concern, and called for the reform of anti-gay laws not only in Malawi, but "where ever it may exist".
Malawi currently heads the African Union, giving Mutharika's gesture added significance.
In Africa, 38 out of 53 countries criminalise homosexuality, punishable in some places by death, according to Human Rights Watch.
Ban's trip through Africa brings him through countries where anti-gay laws have recently come into sharp focus -- Malawi and Uganda, where a proposed bill would criminalize even public discussion of homosexuality and forbid renting property to gays.
While that bill is extreme, the underlying attitude is hardly unique.
In Zimbabwe, two gay activists were detained for six days last week on charges of possessing pornography and demeaning President Robert Mugabe, who in March called homosexuality "insanity".
In February, a mob in Kenya attacked suspected gays in an attack on an AIDS clinic.
Last year in Senegal, bodies of gay men were exhumed and tossed out of Muslim cemeteries.
"Each and every member state, they have their own domestic laws, regulations, traditions, religious beliefs and convictions that we respect," Ban said.
"But when those values and laws and traditions, if they are not consistent with basic international human rights or basic international standards, it is the responsibility of the leaders to reform or change or adapt."
That's hard to do when public opinion in many countries supports the tough laws, often fueled by fundamentalist religious leaders.
Canaan Phiri, secretary general of the Malawi Council of Churches, said "homosexuality acts are a sin and the judgment on the gays was within the law."
Zambian Bishop J.H.K. Banda, who heads the national AIDS council, has made similar remarks in his country.
Nigeria's Anglican leaders have led the backlash against moves for gay weddings in the church.
Yet at the same time, across Africa gays are becoming more assertive in campaigning for rights.
South Africa remains the only country on the continent to ensure equal rights for gays.
But a group in Botswana has filed a legal challenge to that nation's sodomy laws. A gay group has petitioned tiny Lesotho for official recognition. And last year Rwanda decided not to criminalise consensual same-sex relations.
While Egypt banned a concert by openly gay singer Elton John, Morocco welcomed him this month, brushing aside the concerns of religious groups.
"The values of privacy, the values of respect for individuals rights are very much African values and so there shouldn't be any conflict with eliminating these laws," said Joseph Amon, the director of Health and Human Rights division at Human Rights Watch.
"Pardoning these individuals is a good first step but it's only the first step. The next step really is the repeal of this offensive legislation."