Here's a chapter (link to a .pdf) from a book published in 1997 entitled "Islamic Homosexualities: Culture: History and Literature". The chapter title is "Male Love and Islamic Law in Arab Spain", although the points it makes apply more broadly than just to the left end of the Mediterranean. I have to say, it's a really intriguing read about the deep contradiction in a range of Islamic national cultures where everyone could talk openly about how men could feel romantic love for men, but still be adamant that acting upon it sexually deserved punishment up to death.
Most interestingly, a large part of the explanation is said to go back to a "curious" hadith ascribed to Mohammad himself. After describing the severe, hadith derived, punishments imposed on the actual practice of homosexuality, the chapter notes:
When we look at other aspects of Islamic culture, however, the indices are strikingly contradictory. Popular attitudes appear much less hostile than in Christendom, and European visitors to Muslim lands were repeatedly shocked by the relaxed tolerance of Arabs, Turks, and Persians who seemed to find nothing unnatural in relations between men and boys (Greenberg 1988:178-81; Crompton 1985:111-18). One measure of this important cultural difference is a vein of ardent romanticism in medieval Arab treatises on love. For Arab writers this "emotional intoxication," as it has been called, springs not just from the love of women, as with the troubadours, but also from the love of boys and other men.
Arab enthusiasts were concerned to establish that romantic love was an experience meaningful and valuable for its own sake. But how were they to reconcile such a view with their faith? They did this did by appealing to a curious hadlth ascribed to Muhammad himself-"He who loves and remains chaste and conceals his secret and dies, dies a martyr" (Giffen 1971:99). The Iraqi essayist Jahiz, who wrote extensively on the subject of love, had laid down the rule that 'ishq-or passionate love---could exist only between a man and a woman. But Ibn Da'ud, who was born the year Jahiz died (868), extended the possibility to love between males in his Book of the flower, and this view seems to have prevailed in Arab culture subsequently (Giffen 1971:86). Ibn Da'ud was a learned jurisprudent as well as a literary man: according to an account frequently mentioned in Arab writings on love, his passion for his friend Muhammad ibn JamI (to whom his book was dedicated) made him a "martyr of love."Here's the description of how Ibn Da'ud was an example of this:
I went to see [Ibn Da'ud] during the illness in which he died and I said to him, "How do you feel?" He said to me, "Love of you-know-who has brought upon me what you see!" So I said to him, "What prevents you from enjoying him, as long as you have the power to do so?" He said, "Enjoyment has two aspects: One of them is the permitted gaze and the other is the forbidden pleasure. As for the permitted gaze, it has brought upon me the condition that you see, and as for the forbidden pleasure, something my father told me has kept me from it. He said ... "the Prophet said ... 'He who loves passionately and conceals his secret and remains chaste and patient, God will forgive him and make him enter Paradise,'" ... and he died that very night or perhaps it was the next day. (Giffen 1971:10-11)Now look, long time readers know that I would generally wish that there was more sexual restraint in the modern West rather than less; but I have to say, there's something that seems oddly immature in this elevation of hidden passion as something especially pleasing to God. A bit like something an adolescent school girl might write in her diary: "It's so romantic, the way he smiled at me today, all the time not knowing how much I love him."
I don't think it's the same as traditional Christian emphasis on the purity of virginity: it's like arguing that virgins are especially favoured for not just resisting sexual feelings, but for keeping all emotion a secret. (OK, well, I suppose in some situations this is the moral thing to do - for example, if your wannabe lover is already married and you don't want to risk upsetting that apple cart. But really, this old Islamic principle seems much broader in intent.)
Anyway, the whole chapter is well written and an easy read. It includes this apparent bit of history, which put me in mind of the old "girl has to pretend she's a boy" story plots, but I don't think we'll see this one turn up in a Disney movie any time soon: