Homosexuality and Islam
With regard to lesbian homosexuality, some have argued that since penetration is not involved, female homosexual acts should be less severely punished. Shari'a (Islamic law) is most concerned with public behavior and outwards, so there is no strong condemnation of homosexuality if it is not displayed in public. 
Homosexuality in the Qur'anThe following passages are taken from the Abdullah Yusuf Ali translation of the Qur'an.
"We also sent Lut: He said to his people: Do ye commit lewdness such as no people in creation (ever) committed before you? For ye practice your lusts on men in preference to women: ye are indeed a people transgressing beyond bounds. And his people gave no answer but this: they said, "Drive them out of your city: these are indeed men who want to be clean and pure!"" (Qur'an 7:80-82)
"Of all the creatures in the world, will ye approach males, And leave those whom Allah has created for you to be your mates? Nay, ye are a people transgressing (all limits)! They said: "If thou desist not, O Lut! thou wilt assuredly be cast out!" He said: "I do detest your doings:" "O my Lord! deliver me and my family from such things as they do!" So We delivered him and his family,- all Except an old woman who lingered behind. But the rest We destroyed utterly. We rained down on them a shower (of brimstone): and evil was the shower on those who were admonished (but heeded not)! Verily in this is a Sign: but most of them do not believe. And verily thy Lord is He, the Exalted in Might, Most Merciful." (Qur'an 26:165-175)
"Would ye really approach men in your lusts rather than women? Nay, ye are a people (grossly) ignorant! But his people gave no other answer but this: They said, "Drive out the followers of Lut from your city: these are indeed men who want to be clean and pure!" But We saved him and his family, except his wife; her We destined to be of those who lagged behind. And We rained down on them a shower (of brimstone): and evil was the shower on those who were admonished (but heeded not)!" (Qur'an 27:55-58)
"And (remember) Lut: behold, he said to his people: "Ye do commit lewdness, such as no people in Creation (ever) committed before you. Do ye indeed approach men, and cut off the highway? - and practise wickedness (even) in your councils?" But his people gave no answer but this: they said: "Bring us the Wrath of Allah if thou tellest the truth." (Qur'an 29:28-29)
"If any of your women are guilty of lewdness, Take the evidence of four (Reliable) witnesses from amongst you against them; and if they testify, confine them to houses until death do claim them, or Allah ordain for them some (other) way. If two men among you are guilty of lewdness, punish them both. If they repent and amend, Leave them alone; for Allah is Oft-returning, Most Merciful." (Qur'an 4:15-16)
Homosexuality in the ShariaWhile there is a consensus that same-sex intercourse is in violation of Islamic law, there are differences of opinion within Islamic scholarship about punishment, reformation, and what standards of proof are required before physical punishment becomes lawful.
In Sunni Islam there are eight madhhabs, or legal schools, of which only four still exist: Hanafi, Shafi'i, Hanbali, Maliki. The main Shia school is called Ja'fari, but there are Zaidi and Ismai'ili also. More recently, some groups have rejected this tradition in favor of greater ijtihad, or individual interpretation. Of these schools, according to Michael Mumisa of the Birmingham-based Al Mahdi institute:
- The Hanafi school does not consider same-sex intercourse to constitute adultery, and therefore leaves punishment up to the judge's discretion. Most early scholars of this school specifically ruled out the death penalty, others allow it for a second offence.
- Imam Shafi'i considers same-sex intercourse as analogous to other zina; thus, a married person found to have done so is punished as an adulterer (by stoning to death), and an unmarried one, as a fornicator, is left to be flogged.
- The Maliki school says that anyone (married or unmarried) found to have committed same-sex intercourse should be punished as an adulterer.
- Within the Ja'fari schools, Sayyid al-Khoi says that anyone (married or unmarried) found to have committed same-sex intercourse should be punished as an adulterer.
According to the modern Islamic scholar Yusuf al-Qaradawi's summary:
"The jurists of Islam have held different opinions concerning the punishment for this abominable practice. Should it be the same as the punishment for zina, or should both the active and passive participants be put to death? While such punishments may seem cruel, they have been suggested to maintain the purity of the Islamic society and to keep it clean of perverted elements." 
History of Homosexuality in Islamic Societies
17th cent. painting of Mahmud and Ayaz (Tehran Museum of Contemporary Art). The love of the Sultan (in red) for his slave (in green) has entered Islamic legend as a paragon of ideal love.
Early Islamic cultures, especially those in which homosexuality was entrenched in the pre-Islamic pagan culture, were renowned for their cultivation of a homosexual aesthetic. They reconciled their new religion using a hadith ascribed to Muhammad declaring male lovers who die chaste to be martyrs: "He who loves and remains chaste and conceals his secret and dies, dies a martyr."
The result is a religion that allows love between those of the same gender as long as they do not have sexual intercourse. Ibn Hazm, Ibn Daud, Al-Mu'tamid, Abu Nuwas, and many others wrote extensively and openly of love between men. However, in order for the transgression to be proven, at least four men or eight women must bear witness against the accused, thus making it very difficult to persecute those who did not remain celibate in their homes.
The intended meaning of "same-sex intercourse" is sexual intercourse between two or more males, or sexual intercourse between two or more females. It does not mean the act of masturbation, nor does it have anything to do with nocturnal emissions, both of which are considered to invalidate wudu and require the Muslim to take a full bath or shower before his or her next prayer, but are not otherwise punishable under Sharia.
Homosexuality Laws in Modern Islamic CountriesSame-sex intercourse carries the death penalty in five officially Muslim nations: Saudi Arabia, Iran, Mauritania, Sudan, and Yemen.  It formerly carried the death penalty in Afghanistan under the Taliban, and in Iraq under a 2001 decree by Saddam Hussein. The legal situation in the United Arab Emirates is unclear. In many Muslim nations, such as Bahrain, Qatar, Algeria or the Maldives, homosexuality is punished with jail time, fines or corporal punishment. In some Muslim-majority nations, such as Turkey, Jordan, Egypt, or Mali, same-sex intercourse is not forbidden by law. However, in Egypt gays have been the victims of laws against "morality".
In Saudi Arabia, the maximium punishment for homosexuality is public execution, but the government will use other punishments, i.e. fines, jail time and whipping as alternatives, unless it feels that homosexuals are challenging state authority by engaging in a gay rights movement.  Iran is perhaps the nation to execute the largest number of its citizens for homosexuality. Since its Islamic revolution in Iran, the Iranian government has executed more than 4000 people charged with homosexual acts. In Afghanistan after the fall of the Taliban homosexuality went from a capital crime to one that it punished with fines and prison sentence, and a similar situation seems to have occurred in Iraq.
Most international human rights organizations, such as Human Rights Watch and Amnesty International, condemn laws that make homosexual relations between consenting adults a crime. Since 1994 the United Nations Human Rights Committee has also ruled that such laws violated the right to privacy guaranteed in the Universal Declaration of Human Rights and the International Covent on Civil and Political Rights. However (except for nations such as Turkey that were required to change their laws to be eligible to join the European Union) most Muslim nations insist that such laws are neccesary to preserve Islamic morality and virtue. Of the nations with a majority of Muslim, only Lebanon has an internal effort to legalize homosexuality.
However, some Muslims have expressed criticism of the legal sanctions used against homosexuality.
Reasons given by Muslims condemning the executions include: the fact that some legal schools (e.g. Hanafi) regard it as unjustified; the argument that the death penalty is not specified for it in the Qur'an; the idea that the punishment is unduly harsh; and opposition to the idea that the state's laws should be based on religion. The introduction of the AIDS pandemic in the Muslim world has also promoted more discussion about the legal status of homosexuality as the legal sanctions against homosexuality have made it difficult to intiaite any educational programs directed at high risks groups.
While executions and other criminal sanctions curtail any public gay rights movement, it is impractical to give criminal sanctions to all homosexuals living in a Muslim country, and it is common knowledge (to foreigners visiting a Muslim country) that some young Muslim men will experiment with homosexual relations as an outlet to sexual desires that cannot be met in a society where the sexes are often kept segregated. These discreet and casual homosexual relations allow men to engage in premartial sex with a low risk of facing the social or legal sanctions that would occur if they involved in adultery or fornication with a woman that might result in a pregnancy. Most of these men do not consider themsleves to be gay or bisexual.
A related problem to full enforcement of the laws against homosexuality is that while the sexes are often segregated, men are encouraged to developed close friendships with other men, and women are encouraged to develop close friendships with other women. Also, the Islamic law requires a certain number of male and female witnesses to the homosexual act to testify in court. Islam does place a strong value on the right to privacy in the home and thus homosexual relations that occur in private are theoretically outside the bounds of the law, although that is more theory then reality.