Homosexuality is defined as a sexual orientation characterized by a romantic attraction, sexual attraction, or sexual behavior exclusively between people of the same sex or gender; as well as "a person's sense of identity based on those attractions, related behaviors, and membership in a community of others who share those attractions." Male homosexuality is thus the emotional or sexual attraction between two or more men individuals, whether they were assigned male at birth or identify as such; men who identify as homosexuals or display homosexual behavior are known as gay men.

Societal attitudes towards same-sex relationships between men have varied over time and place. Attitudes to male homosexuality have varied from requiring males to engage in same-sex relationships to casual integration, through acceptance, to seeing the practice as a minor sin, repressing it through law enforcement and judicial mechanisms, and to proscribing it under penalty of death. In addition, it has varied as to whether any negative attitudes towards men who have sex with men have extended to all participants, as has been common in Abrahamic religions, or more towards passive (penetrated) participants, as was common in Ancient Greece and Ancient Rome. Which acts are considered "sexual", "lustful", or "romantic" have also differed throughout history. At various times, actions such as bed-sharing, cuddling, passionate declarations of love, and even kissing have been considered appropriate within same-sex friendships and/or unacceptable within the context of opposite-sex friendships and even marriage.

Male homosexuality was generally tolerated in many Ancient and Medieval Eastern cultures such as those influenced by Buddhism, Hinduism, and Taoism. Homophobia in the eastern world is often discussed in the context of being an import from the western world. Some have contended that definitions of "progress" on homosexuality (e.g. LGBT rights) as being Western-centric.

Many male historical figures, including Socrates, Lord Byron, Edward II, and Hadrian,Roman Homosexuality, Craig Arthur Williams, p.60 have had terms such as gay or bisexual applied to them; some scholars, such as Michel Foucault, have regarded this as risking the anachronistic introduction of a contemporary social construct of sexuality foreign to their times, though others challenge this. The author has made adapted and expanded portions of this book available online as A Critique of Social Constructionism and Postmodern Queer Theory. A common thread of constructionist argument is that no one in antiquity or the Middle Ages experienced homosexuality as an exclusive, permanent, or defining mode of sexuality. John Boswell has countered this argument by citing ancient Greek writings by Plato, which describe individuals exhibiting exclusive homosexuality.

Africa

Egypt

Homosexuality in ancient Egypt is a passionately disputed subject within Egyptology: historians and egyptologists alike debate what kind of view the Ancient Egyptian society fostered about homosexuality. Only a handful of direct hints have survived to this day and many possible indications are only vague and offer plenty of room for speculation.

The best known case of possible homosexuality in Ancient Egypt is that of the two high officials Nyankh-Khnum and Khnum-hotep. Both men lived and served under pharaoh Niuserre during the 5th Dynasty (c. 2494–2345 BC).Richard Parkinson: Homosexual Desire and Middle Kingdom Literature. In: The Journal of Egyptian Archaeology (JEA), vol. 81, 1995, pp. 57–76. Nyankh-Khnum and Khnum-hotep each had families of their own with children and wives, but when they died their families apparently decided to bury them together in one and the same mastaba tomb. In this mastaba, several paintings depict both men embracing each other and touching their faces nose-on-nose. These depictions leave plenty of room for speculation, because in Ancient Egypt the nose-on-nose touching normally represented a kiss.

Egyptologists and historians disagree about how to interpret the paintings of Nyankh-khnum and Khnum-hotep. Some scholars believe that the paintings reflect an example of homosexuality between two married men and prove that the Ancient Egyptians accepted same-sex relationships. Other scholars disagree and interpret the scenes as an evidence that Nyankh-khnum and Khnum-hotep were twins, even possibly conjoined twins.

It is unclear what exact views the Ancient Egyptians held on homosexuality. All surviving documents and literature that contained sexually orientated stories never name the nature of the sexual deeds, but instead uses stilted and flowery euphemisms. While the stories about Seth and his sexual behavior may reveal rather negative thoughts and views, the tomb inscription of Nyankh-khnum and Khnum-hotep may instead suggest that homosexuality was likewise accepted. Ancient Egyptian documents never clearly say that same-sex relationships were seen as reprehensible or despicable. And no Ancient Egyptian document mentions that homosexual acts were set under penalty. Thus, a straight evaluation remains problematic.Emma Brunner-Traut: Altägyptische Märchen. Mythen und andere volkstümliche Erzählungen. 10th Edition. Diederichs, Munich 1991, , pp. 178–179.

Uganda

In the 19th century Mwanga II (1868–1903) the Kabaka of Buganda regularly had sex with his male page."Long-Distance Trade and Foreign Contact". Uganda. Library of Congress Country Studies. December 1990. Retrieved 6 June 2009.

The Americas Pre-colonization Indigenous societies

Among Indigenous peoples of the Americas prior to European colonization, a number of Nations had respected ceremonial and social roles for homosexual, bisexual, and gender-nonconforming individuals in their communities; in many contemporary Native American and First Nations communities, these roles still exist.Estrada, Gabriel S. 2011. "Two Spirits, Nádleeh, and LGBTQ2 Navajo Gaze ." American Indian Culture and Research Journal 35(4):167–190. While each Indigenous culture has their own names for these individuals, a modern, pan-Indian term that was adopted in 1990 is "Two-Spirit". This new term has not been universally accepted, having been criticized by traditional communities who already have their own terms for the people being grouped under this "urban neologism", and by those who reject what they call the "western" binary implications, such as implying that Natives believe these individuals are "both male and female". However, it has generally met with more acceptance than the anthropological term it replaced.

Homosexual and gender-variant individuals were also common among other pre-conquest civilizations in Latin America, such as the Aztecs, Mayans, Quechuas, Moches, Zapotecs, and the Tupinambá of Brazil.

The Spanish conquerors were horrified to discover homosexual sex openly practiced among native peoples, and attempted to crush it out by subjecting whom they dubbed berdaches under their rule to severe penalties, including public execution, burning and being torn to pieces by dogs.Mártir de Anglería, Pedro. (1530). Décadas del Mundo Nuevo. Quoted by Coello de la Rosa, Alexandre. "Good Indians", "Bad Indians", "What Christians?": The Dark Side of the New World in Gonzalo Fernández de Oviedo y Valdés (1478–1557), Delaware Review of Latin American Studies, Vol. 3, No. 2, 2002.

Post-colonization

In the United States, Homosexual activity appears to have increased in urban areas during the 19th century, along with other unorthodox sexual activity. At this time, sexual pleasure even within marriage was still being normalized in the Victorian era and into the 1910s. Sex outside of marriage, in any context, was generally still seen as somewhat deviant. Historian Hanne Blank notes that this is part of a broader Enlightenment trend of using science to pathologize moral transgressions that had previously been regulated by the church.

Asia

East Asia In East Asia, same-sex love has been referred to since the earliest recorded history.

China Homosexuality is widely documented in ancient China and attitudes towards it varied through time, location, and social class.Passions of the Cut Sleeve: The Male Homosexual Tradition in China by Bret Hinsch; Review by: Frank Dikötter. Bulletin of the School of Oriental and African Studies, University of London, Vol. 55, No. 1(1992), Cambridge University Press, p. 170 Chinese literature recorded multiple anecdotes of men engaging in homosexual relationships. In the story of the leftover peach(余桃), set during the Spring and Autumn Era, the historian Han Fei recorded an anecdote in the relationship of Mi Zixia (彌子瑕) and Duke Ling of Wei (衛靈公) in which Mizi Xia shared an especially delicious peach with his lover.Hinsch, Bret. (1990). Passions of the Cut Sleeve. University of California Press. The story of the cut sleeve(断袖) recorded the Emperor Ai of Han sharing a bed with his lover, Dongxian (董賢); when Emperor Ai woke up later, he carefully cut off his sleeve, so as not to awake Dongxian, who had fallen asleep on top of it. Scholar Pan Guangdan (潘光旦) came to the conclusion that many emperors in the Han dynasty had one or more male sex partners. However, except in unusual cases, such as Emperor Ai, the men named for their homosexual relationships in the official histories appear to have had active heterosexual lives as well.

With the rise of the Tang dynasty, China became increasingly influenced by the sexual mores of foreigners from Western and Central Asia, and female companions began to replace male companions in terms of power and familial standings. The following Song dynasty was the last dynasty to include a chapter on male companions of the emperors in official documents. During these dynasties, the general attitude toward homosexuality was still tolerant, but male lovers started to be seen as less legitimate compared to wives and men are usually expected to get married and continue the family line.

During the Ming Dynasty, it is said that the Zhengde Emperor had a homosexual relationship with a Muslim leader named Sayyid Husain. In later Ming Dynasty, homosexuality began to be referred to as the "southern custom" due to the fact that Fujian was the site of a unique system of male marriages, attested to by the scholar-bureaucrat Shen Defu and the writer Li Yu, and mythologized by in the folk tale, The Leveret Spirit.

The Qing dynasty instituted the first law against consensual, non-monetized homosexuality in China. However, the punishment designated, which included a month in prison and 100 heavy blows, was actually the lightest punishment which existed in the Qing legal system. Homosexuality started to become eliminated in China by the Self-Strengthening Movement, when homophobia was imported to China along with Western science and philosophy.

Japan Homosexuality in Japan, variously known as shudo or nanshoku, has been documented for over one thousand years and had some connections to the Buddhist monastic life and the samurai tradition. This same-sex love culture gave rise to strong traditions of painting and literature documenting and celebrating such relationships.

Thailand Similarly, in Thailand, kathoey, or "ladyboys," have been a feature of Thai society for many centuries, and Thai kings had male as well as female lovers. While kathoey may encompass simple effeminacy or transvestism, it most commonly is treated in Thai culture as a third gender. They are generally accepted by society.

South Asia