There were few laws restricting sexual behavior in Japan in the beginning of modern period. Anal sodomy was restricted by legal prohibition in 1872, but the provision was repealed only seven years later by the Penal Code of 1880 in accordance with the Napoleonic Code.[1][better source needed]

The Japanese term nanshoku(男色?, which can also be read as danshoku) is the Japanese reading of the same characters in Chinese, which literally mean "male colors." The character 色 (color) has the meaning of sexual pleasure in China and Japan. This term was widely used to refer to some kind of male–male sex in a pre-modern era of Japan. The term shudō(衆道?, abbreviated from wakashudō, the "way of adolescent boys") is also used, especially in older works.[citation needed] The Japanese nanshoku tradition drew heavily on that of China (see homosexuality in China).[citation needed]

A variety of obscure literary references to same-sex love exist in ancient sources, but many of these are so subtle as to be unreliable; another consideration is that declarations of affection for friends of the same sex were common. Nevertheless, references do exist, and they become more numerous in the Heian Period, roughly the 11th century. In The Tale of Genji, written in the early 11th century, men are frequently moved by the beauty of youths.[citation needed] In one scene the hero is rejected by a lady and instead sleeps with her young brother:

Genji pulled the boy down beside him ... Genji, for his part, or so one is informed, found the boy more attractive than his chilly sister.[2]

The Tale of Genji is a novel, but there are several Heian-era diaries that contain references to homosexual acts. Some of these contain references to Emperors involved in homosexual relationships and to "handsome boys retained for sexual purposes" by emperors.[3]

There can be found references to what Leupp has called "problems of gender identity" in other literary works, such as the story of a youth[who?] falling in love with a girl who is actually a cross-dressing male.[citation needed]

Several writers have noted the strong historical tradition of open bisexuality and homosexuality among male Buddhist institutions in Japan. When the Tendai priest Genshin harshly criticised homosexuality as immoral, others mistook his criticism as having being because the acolyte wasn't one's own.[4][5]

Nanshoku relationships inside monasteries were typically pederastic: an age-structured relationship where the younger partner is not considered adult. The older partner, or nenja ("lover" or "admirer"), would be a monk, priest or abbot, while the younger partner was assumed to be an acolyte (稚児,chigo?), who would be a prepubescent or adolescent boy;[6] the relationship would be dissolved once the boy reached adulthood (or left the monastery). Both parties were encouraged to treat the relationship seriously and conduct the affair honorably, and the nenja might be required to write a formal vow of fidelity.[7] Outside of the monasteries, monks were considered to have a particular predilection for male prostitutes, which was the subject of much ribald humor.[8]

There was no religious opposition to homosexuality in Japan in non-Buddhist traditions.[9]Tokugawa commentators felt free to illustrate kami engaging in anal sex with each other.[10] During the Tokugawa period, some of the Shinto gods, especially Hachiman, Myoshin, Shinmei and Tenjin, "came to be seen as guardian deities of nanshoku" (male–male love).[10] Tokugawa-era writer Ihara Saikaku joked that since there are no women for the first three generations in the genealogy of the gods found in the Nihon Shoki, the gods must have enjoyed homosexual relationships—which Saikaku argued was the real origin of nanshoku.[10]

Male couple on a futon: A man reclines with one wakashū and converses with another. Possibly the first nanshoku erotic print, as well as an early example of a hand-colored ukiyo-e print in the shunga (erotic) style. Early 1680s.Hishikawa Moronobu (1618–94); Ôban format, 10.25" × 15"; Sumi ink and color on paper; Private collection.

From religious circles, same-sex love spread to the warrior (samurai) class, where it was customary for a boy in the wakashū age category to undergo training in the martial arts by apprenticing to a more experienced adult man. The man was permitted, if the boy agreed, to take the boy as his lover until he came of age; this relationship, often formalized in a "brotherhood contract",[11] was expected to be exclusive, with both partners swearing to take no other (male) lovers. This practice, along with clerical pederasty, developed into the codified system of age-structured homosexuality known as shudō, abbreviated from wakashūdo, the "way (do) of wakashū".[12] The older partner, in the role of nenja, would teach the wakashū martial skills, warrior etiquette, and the samurai code of honor, while his desire to be a good role model for his wakashū would lead him to behave more honorably himself; thus a shudō relationship was considered to have a "mutually ennobling effect".[13] In addition, both parties were expected to be loyal unto death, and to assist the other both in feudal duties and in honor-driven obligations such as duels and vendettas. Although sex between the couple was expected to end when the boy came of age, the relationship would, ideally, develop into a lifelong bond of friendship. At the same time, sexual activity with women was not barred (for either party), and once the boy came of age, both were free to seek other wakashū lovers.

Like later Edo same-sex practices, samurai shudō was strictly role-defined; the nenja was seen as the active, desiring, penetrative partner, while the younger, sexually receptive wakashū was considered to submit to the nenja's attentions out of love, loyalty, and affection, rather than sexual desire. Among the samurai class, adult men were (by definition) not permitted to take the wakashū role; only preadult boys (or, later, lower-class men) were considered legitimate targets of homosexual desire.[14] In some cases, shudō relationships arose between boys of similar ages, but the parties were still divided into nenja and wakashū roles.

Man and youth, Miyagawa Isshō, ca. 1750; Panel from a series of ten on a shunga-style painted hand scroll (kakemono-e); sumi, color and gofun on silk. Private collection. Note that the youth on the left is wearing a kimono whose style (furisode) and color was considered appropriate for adolescents of both sexes but not adult men, which along with the partially shaved pate denotes the boy's wakashū age status.

As Japanese society became pacified, the middle classes adopted many of the practices of the warrior class, in the case of shudō giving it a more mercantile interpretation. Male prostitutes (kagema), who were often passed off as apprentice kabuki actors and who catered to a mixed male and female clientele, did a healthy trade into the mid-19th century despite increasing restrictions.[15] Many such prostitutes, as well as many young kabuki actors, were indentured servants sold as children to the brothel or theatre, typically on a ten-year contract.[16] Relations between merchants and boys hired as shop staff or housekeepers were common enough, at least in the popular imagination, to be the subject of erotic stories and popular jokes.[17] Young kabuki actors often worked as prostitutes off-stage, and were celebrated in much the same way as modern media stars are today, being much sought after by wealthy patrons, who would vie with each other to purchase their favors.[18]Onnagata (female-role) and wakashū-gata (adolescent boy-role) actors in particular were the subject of much appreciation by both male and female patrons,[19] and figured largely in nanshokushunga prints and other works celebrating nanshoku, which occasionally attained best-seller status.[20]

Male prostitutes and actor-prostitutes serving male clientele were originally restricted to the wakashū age category, as adult men were not perceived as desirable or socially acceptable sexual partners for other men. During the 17th century, these men (or their employers) sought to maintain their desirability by deferring or concealing their coming-of-age and thus extending their "non-adult" status into their twenties or even thirties; this eventually led to an alternate, status-defined shudō relationship which allowed clients to hire "boys" who were, in reality, older than themselves.[21] This evolution was hastened by mid-17th century bans on the depiction of the wakashū's long forelocks, their most salient age marker, in kabuki plays; intended to efface the sexual appeal of the young actors and thus reduce violent competition for their favors, this restriction eventually had the unintended effect of de-linking male sexual desirability from actual age, so long as a suitably "youthful" appearance could be maintained.[22]

These activities were the subject of countless literary works, most of which remain to be translated. However, English translations are available for Ihara Saikaku who created a bisexual main character in The Life of An Amorous Man (1682), Jippensha Ikku who created an initial gay relationship in the post-publication "Preface" to Shank's Mare (1802 et seq), and Ueda Akinari who had a homosexual Buddhist monk in Tales of Moonlight and Rain (1776). Likewise, many of the greatest artists of the period, such as Hokusai and Hiroshige, prided themselves in documenting such loves in their prints, known as ukiyo-e, pictures of the floating world, and where they had an erotic tone, shunga, or pictures of spring.[23]

Nanshoku was not considered incompatible with heterosexuality; books of erotic prints dedicated to nanshoku often presented erotic images of both young women (concubines, mekake, or prostitutes, jōrō) as well as attractive adolescent boys (wakashū) and cross-dressing youths (onnagata). Indeed, several works suggest that the most "envious" situation would be to have both many jōrō and many wakashū.[24] Likewise, women were considered to be particularly attracted to both wakashū and onnagata, and it was assumed that these young men would reciprocate that interest.[24] Therefore, both the typical practitioners of nanshoku and the young men they desired would be considered bisexual in modern terminology.[25] Men who were purely homosexual might be called "woman-haters" (onna-girai); this term, however, carried the connotation of aggressive distaste of women in all social contexts, rather than simply a preference for male sexual partners.[26]

Despite the recent trends that suggest a new level of tolerance, as well as open scenes in more cosmopolitan cities (such as Tokyo and Osaka), Japanese gay men and lesbian women often conceal their sexuality; with many even marrying persons of the opposite sex.[27]

Japan has no laws against homosexual activity, and has some legal protections for gay individuals. In addition, there are some legal protections for transgender individuals.

Consensual sex between adults of the same sex is legal, but some prefectures set the age of consent for same-sex sexual activity higher than for opposite-sex sexual activity.

While civil rights laws do not extend to protection from discrimination based on sexual orientation, some governments have enacted such laws. The government of Tokyo has passed laws that ban discrimination in employment based on sexual identity.

The major political parties express little public support for gay rights issues. Despite recommendations from the Council for Human Rights Promotion, the Diet has yet to take action on including sexual orientation in the country's civil rights code.[citation needed]

Some political figures, however, are beginning to speak publicly about they themselves being gay. Kanako Otsuji, an assemblywoman from Osaka, came out as a lesbian in 2005.[28] Two years earlier, in 2003, Aya Kamikawa became the first openly transgender elected official in Tokyo, Japan.[29]

A number of artists, nearly all male, have begun to speak publicly about being gay, appearing on various talk shows and other programs, their celebrity often focused on their sexuality; twin pop-culture critics Piko and Osugi are an example.[30]Akihiro Miwa, a drag queen and former lover of author Yukio Mishima, is the television advertisement spokesperson for many Japanese companies ranging from beauty to financial products.[31]Kenichi Mikawa, a former pop idol singer who now blurs the line between male and female costuming and make-up, can also regularly be seen on various programs, as can crossdressing entertainer Peter.[32] Singer-songwriter and actress Ataru Nakamura was one of the first transgender personalities to become highly popular in Japan; in fact, sales of her music rose after she discussed her MTF gender reassignment surgery on the variety show All Night Nippon in 2006.[33]

Some entertainers have used stereotypical references to homosexuality to increase their profile. Razor Ramon Sumitani a.k.a. Hard Gay (HG), a comedian, shot to fame after he began to appear in public wearing a leather harness, hot pants and cap. His outfit, name, and trademark pelvis thrusting and squeals earned him the adoration of fans and the scorn of many in the Japanese gay community.

A greater amount of gay and transgender characters have also begun appearing (with positive portrayals) on Japanese television, such as the highly successful Hanazakari no Kimitachi e and Last Friends television series.

Gay magazine Adonis (ja) of the membership system was published in 1952. There is a gay magazine that was first published in the 1970s.

With the rise of visible gay community and the attendant rise of media for gay audiences, the Hadaka Matsuri ("Naked Festival") has become a fantasy scenario for gay videos.[36]

Gei-comi ("gay-comics") are gay-romance themed comics aimed at gay men. While yaoi comics often assign one partner to a stereotypical heterosexual female role, gei-comi generally depict both partners as masculine and in an equal relationship. Another common term for this genre is bara, stemming from the name of the first publication of this genre to gain popularity in Japan, Barazoku. The former term is more common in Japan, used similarly to yaoi as a blanket term for a wide range of publications, while the latter is more common in the West and more often refers to a general aesthetic rather than specifically the genre of comics.

Lesbian-romance themed anime and manga is known as yuri (which means "lily"). Yuri is used as the general term, much more so than yaoi; it is used to describe female-female relationships in material and is typically marketed towards straight people, homosexuals in general or lesbians, despite significant stylistic and thematic differences between works aimed at the different audiences. Another word that has become popular in Japan as an equivalent term to Yuri is "GL" (short for "Girls' Love" in opposite to"Boys' Love"). Unlike yaoi, yuri is believed to be aimed at a more widespread audience. There are a variety of yuri titles (or titles that integrate yuri content) aimed at women, such as Revolutionary Girl Utena, Oniisama E, Maria-sama ga Miteru, Sailor Moon (most notably the third season, as well as the fifth season), Strawberry Shake Sweet, Love My Life, etc.; and there are a variety of yuri titles of anime such as Kannazuki no Miko, Strawberry Panic!,Simoun, and My-Hime. There is a long-time running manga magazine in Japan that focus solely on yuri stories: Comic Yuri Hime which gained merges from its other subsidiary comics and currently runs as the only Yuri Hime named magazine. Other magazines and anthologies of Yuri that have emerged throughout the early 21st Century are Mebae, Hirari, and Tsubomi (the latter two have ceased publications by 2014).

^ abMostow, Joshua S. (2003), "The gender of wakashu and the grammar of desire", in Joshua S. Mostow, Norman Bryson, Maribeth Graybill, Gender and power in the Japanese visual field, University of Hawaii Press, pp. 49–70, ISBN0-8248-2572-1