Pop quiz: Which developing nation has recently called for decriminalizing same-sex relations, virtually banned anti-gay political advertisements and also appointed two progressive supreme court justices who have expressed a desire to overturn anti-gay legislation?

One of the Eastern European nations that’s anxious to join the euro zone? Not even close.

The answer might surprise you: Kenya.

The East African nation has long been considered relatively progressive on lesbian, gay, bisexual and transgender issues.  Same-sex relations are illegal—penalties are between five and 14 years’ imprisonment—but arrests and prosecutions are relatively rare.  Kenya was also the first African nation to include gay and bisexual men— “men who have sex with men” (MSM) in public health jargon—in their national HIV strategy in 2006.

As a result: Kenya has rapidly become a refuge for many gays who have been persecuted in neighboring countries. “Some have fled a strict application of Islamic law in Somalia,” reported Agence France Presse in February. “Others are running from general sexual violence in the Democratic Republic of Congo and yet others have fled a climate of growing hostility elsewhere in east Africa.”

“With the exception of South Africa, Kenya is indeed the most advanced African nation when it comes to issues of men who have sex with men,”  Denis Nzioka told EBONY in a brief interview from Nairobi. Nzioka is the founder of Identity Kenya and the nation’s most visible gay activist.

Same-sex acts are currently illegal in at least 38 of 54 African countries. Four nations—Mauritania, Nigeria, Somalia and Sudan—boast the death penalty for gays. South Africa and Seychelles are the only African nations that protect LGBT rights.

South Africa is the continent’s outlier—the only nation that not only protects LGBT rights but guarantees marriage equality.  But the reality is much different in the townships. Black lesbians are often brutally targeted for so-called “corrective” rape—or killed. Gay men and transgender women are also frequent targets of extreme violence.

Recent years have seen an escalation in state-sponsored anti-LGBT terror across much of Africa. Uganda has gained international attention for a proposed draconian anti-gay bill that would mandate life imprisonment and/or death penalties. Extreme legislation has also been proposed in Nigeria, Burundi, Liberia, Cameroon and elsewhere.

Not the case in Kenya. The past several years have seen a quiet but steady increase in incremental advances. Much of the MSM organizing was initially launched from HIV/AIDS. About 6.3 percent of the adult population is HIV positive.  The rate is about mid-range for sub-Saharan Africa—but  the sheer numbers of infected Kenyans mean that only South Africa and Nigeria have more HIV-positive citizens on the continent, according to AVERT.

“Now gay men are included in national policies and initiatives,” Nzioka told EBONY. “We [continued] to network with key organizations and cultivated a strong media presence.”

Two pro-LGBT justices were confirmed to the Supreme Court in June 2011. The recently-appointed Chief Justice Dr. Willy Munyoki Mutunga has said that “gay rights are human rights” and has expressed a desire to overturn anti-gay legislation. The national police are finally taking action against an extortion ring—which included some law enforcement officers—that has targeted gay, married and closeted men.

The Kenya National Human Rights Commission called for the decriminalization of sex work and same-sex relations at the beginning of May. The country’s largest newspaper, The Daily Nation, supported the move—and its owners began addressing human rights in the nation’s “virtual” infrastructure.  Last month the Nation Media Group, East Africa’s largest media conglomerate, banned all political advertising that includes any “contempt” toward “sexual orientation. The media group includes print and broadcast outlets in Kenya, Uganda and Tanzania.

And just this week:  Safaricom, the nation’s leading telecom provider, announced that it would screen all political advertising “messages to ensure that hate speech is not spread through its SMS platform,” reported The Standard. That will include anti-gay political text messages.

But there has been a backlash. In November 2010,  Prime Minister Raila Odinga called for the mass arrests of gays at a political rally but later retracted his statements.  There has also been an increase in anti-gay violence. A gay friendly bar described as “popular with male sex workers” was targeted with a grenade attack by an al-Qaeda-backed militant group last fall. Two men were killed. More recently, only two weeks ago, two gay men in a Nairobi slum were attacked by a mob after they were caught having sex. One man was stoned to death. There have also been disturbing reports of a cluster of lesbians completing suicide—at least “four have taken their lives since the year started,” reported Identity Kenya.

Despite the recent violence, Kenyan activists are optimistic. “We’re confident in the successes that we’ve had,” said Nzioka. “We’ve very proud of the work that we’re doing on Kenya.”

“There is a strong MSM movement in Kenya,” said Joel Gustave Nana, executive director of the Johannesburg -based African Men for Sexual Health and Rights (ASMSHer). “Kenya is starting to look like one of the few success stories in Africa.”

Rod McCullom has written and produced for ABC News and NBC, and his writing has appeared in EBONY, The Advocate, Out.com, NPR and many others. Check out his award winning site Rod 2.0. Follow him on Twitter: @RodMcCullom.