While many of their compatriots savor a new political era, gays in Egypt and Tunisia aren't sharing the joy, according to activists who wonder if the two revolutions could in fact make things worse for an already marginalized community.
In both countries, gays and their allies worry that conservative Islamists, whose credo includes firm condemnation of homosexuality, could increase their influence in elections later this year.
"Our struggle goes on _ it gets more and more difficult," Tunisian gays-rights and HIV-AIDS activist Hassen Hanini wrote to The Associated Press in an email. "The Tunisian gay community is still seeking its place in society in this new political environment."
In much of the world, the push for gay rights has advanced inexorably in recent years. Countries which now allow same-sex marriage range from Portugal to South Africa to Argentina.
Throughout the Arab world, however, homosexual conduct remains taboo _ it is punishable by floggings, long prison terms and in some cases execution in religiously conservative Saudi Arabia, and by up to three years imprisonment in relatively secular Tunisia. Iraq and Yemen each experienced a surge of killings of gays two years ago.
In Egypt, consensual same-sex relations are not prohibited as such, but other laws _ those prohibiting "debauchery" or "shameless public acts" _ have been used to imprison gay men in recent years.
Ten years ago, Egypt attracted worldwide attention _ including criticism from international human rights groups _ when 52 men were arrested in a police raid on a Nile boat restaurant/disco and accused of taking part in a gay sex party. After a highly publicized trial in an emergency state security court, 23 of the men were convicted and sentenced to prison terms of one to five years for immoral behavior and contempt of religion.
The case caused a storm in Egypt as some newspapers published names and photos of the defendants in graphic stories. At the start of the trial, many defendants covered their faces with towels in the presence of photographers.
In 2008, four HIV-positive Egyptians were sentenced to three years in prison after being convicted of the "habitual practice of debauchery." Human rights groups warned that the case could undermine HIV/AIDS prevention efforts in Egypt.
U.S.-based Human Rights Watch _ which monitors discrimination against gays as part of wide-ranging global activities _ says there are no organizations in Egypt specifically identified as gay-rights advocates.
"There's been no movement on this issue in Egypt since the revolution nor is there likely to be any improvement in the short-term," said Heba Morayef, the main Egypt researcher for Human Rights Watch.
Some of the void in advocacy is filled by the Egyptian Initiative for Personal Rights, which in a decade of existence has defended people entangled in various anti-gay prosecutions as part of its broader civil-liberties agenda.
The group's executive director, Hossam Bahgat, said the once-common use of entrapment to arrest gays has subsided in recent years. But he said anti-gay debauchery trials still take place occasionally.
Short-term, Bahgat was skeptical that any Western-style gay-rights movement could take hold in Egypt _ despite the sense of liberation following the February ouster of Hosni Mubarak, the longtime authoritarian president.
"The challenge is to ensure that what emerges from the transition isn't just a democratic government but also a democratic society," Bahgat said, referring to the quest for equitable treatment of women, religious minorities and gays.
"Any attempt to fixate only on the issue of same-sex relationships is not going to be very fruitful and can cause more harm than good," he said. "We have to learn to coexist, to not only accept our diversity, but even celebrate it."
In the long term, Bahgat said he was cautiously optimistic because Egyptians under 30 _ a majority of the population _ seem more open than their elders to the concept of a diverse Egypt.
"As Egypt moves from dictatorship to being a normal country, we are going to have to live with people we completely disagree with, and there will be elements trying to impose their own understanding of morality," he said. "We're going to win some battles and lose some others."
Notable among the young Egyptians trying to change attitudes toward gays is Mostafa Fathi, 28, the editor-in-chief at a Cairo-based Internet radio station. Two years ago, he published a book called "In the World of Boys" which he says is the first Egyptian novel depicting a gay central character empathetically.
The book stirred controversy, and Fathi said some government officials made known their displeasure. But it was not banned, and Fathi said copies are still available in some bookstores.
"In my book, I have a character who says, 'I am a gay. You have to respect me,'" Fathi said. "We all should respect everyone. It's not good to judge people as evil."
In contemporary Cairo, the setting for Fathi's book, it's commonly acknowledged that there is a relatively established gay community, perhaps a bit less paranoid than in the past but still operating secretively.
"You have to talk about it under the table," he said. "I like to think the future will be better ... but most of the Egyptian people still reject gays."
He was surprised that a straightforward article about his book, by a foreign writer, was posted on the English-language web site of the conservative Muslim Brotherhood, Egypt most powerful political movement. However, Fathi noted that comments on the Brotherhood's Arabic site were virulently critical of his novel, with some saying gays should be killed.
Fathi says he wants to launch an online magazine about gays in Egypt that would include discussion of serious issues such as protection against violence and infectious diseases. A trusted friend who's a human rights lawyer persuaded him to wait for the political situation to stabilize: "He says it's a good idea, but not now. Maybe in a year or two."
Given the nature of his novel, Fathi says he is often asked if he is gay.
"I never say I'm gay or not," he explained. "I say it's none of your business."
Egypt's first post-revolution elections are scheduled for September, and the Muslim Brotherhood is expected to compete for half of the seats Parliament. In Tunisia, where long-term dictator Zine El Abidine Ben Ali was ousted in January, elections are planned for July, and liberals worry that Islamists may gain power.
Under Ben Ali, Tunisia won some international praise for granting women more rights than most other Arab countries, but otherwise was widely criticized for human rights abuses. Gays weren't necessarily singled out; much of the repression was aimed at political dissent.
Hanini, the Tunisian activist, said some Tunisian gays became a bit more open about themselves in recent years, but for the most part they were discreet about their socializing. He noted that the country's law against homosexual conduct _ Penal Code 230 _ remains in force.
Hanini says Tunisia's modest corps of gay-rights activists took part in the uprising that led to Ben Ali's ouster but now worry that political developments may work against them.
"The prestige of the state is no longer respected," he wrote. "This doesn't work in favor of Tunisian gays, who are finding it increasingly difficult to be accepted."
"And don't forget the Islamist parties who are trying to play the role of judge right now, and who view homosexuality and the gay community as a product of the former regime," he said. "They call it 'rot' that must be cleaned away."
One of Hanini's fellow activists, Badr Baabou, said in an email that Tunisian gays "face a daily struggle _ in the street, at school, in the workplace, in one's family _ to be accepted and respected."
The current political atmosphere is tense and uncertain, not only for gays but for the country as a whole, he wrote. Yet he concluded on a hopeful note.
"The image I keep thinking is a mother giving birth to her child, with cries of pain," he said. "Out of this, I think we can grow into a Tunisia that's more modern, open and tolerant."