In case Mahmoud Ahmadenijad's recent odd commentary about gays in Iran has sparked your interest about the broader question of queer life under repressive Islamic theocracies, it's lucky for you that the May 2007 Atlantic had this great piece from Nadya Labi about gay life in Saudi Arabia. This section even includes a hint as to what Ahmadenijad may have been talking about if you want to give his words a generous construction:
This is surprising enough. But what seems more startling, at least from a Western perspective, is that some of the men having sex with other men don’t consider themselves gay. For many Saudis, the fact that a man has sex with another man has little to do with “gayness.” The act may fulfill a desire or a need, but it doesn’t constitute an identity. Nor does it strip a man of his masculinity, as long as he is in the “top,” or active, role. This attitude gives Saudi men who engage in homosexual behavior a degree of freedom. But as a more Westernized notion of gayness—a notion that stresses orientation over acts—takes hold in the country, will this delicate balance survive?
This is, I think, a not uncommon pattern around the world and throughout history -- with participation in same-sex acts much more divorced from concepts of "gayness" as an identity than it is in the contemporary west.