In Edo Japan, adolescent boys that became underlings to samurai lived a sexually fluid, gender non-specific way of life. The boys, or wakashu, had unique hairstyles and wore distinct clothing to mark their status as the love partners of samurai superiors. Wakashu were also able to sleep with women, straddling the line between man and woman while simultaneously bridging the gap between childhood and adulthood. As a result, they're often referred to as Japan's "third gender."
Sex in medieval Japan isn't easily categorized and, as one of the many unique traditions of samurai life, wakashu represented the spectrum of gender and sexual mores. As samurai declined in society, wakashu fell by the wayside, but in their heyday, they were the "beautiful youth" of Japan.
The practice of wakashudo in pre-modern Japan involved a samurai warrior taking a young boy as an apprentice, a lover, and a companion - a wakashu. Wakashudo translates to "the way of adolescent boys" and was a relationship that bound the male partners until the young wakashu came of age.
In many instances, the samurai, known as the nenja (meaning "lover" or "admirer"), and the wakashu remained close for their entire lives.
The Buddhist tradition in Japan also included same-gender relationships between monks and young acolytes. Nanshuko, as the practice was known, involved an older monk - the nenja or "lover" - and a boy called a chigo. The youngest boys at a monastery would be as young as five years old, known as kisshiki, but the relationship between nenja and chigo didn't begin until a boy was older. Chigo were considered "angelic boys."
The love that a nenja and a chigo shared, according to some scholars, was a mix of natural love for beauty and "spiritual veneration for Buddha."
The older Buddhist monk was responsible for the spiritual life of his chigo as well as his education, much like the relationship between a samurai and his wakashu. The samurai was a model of the proper morality, dedication, and virtue found in the bushido code - the instruction manual of sorts for samurai - and he imparted that upon his companion. He also taught the wakashu fighting techniques, social etiquette, and anything else he would need to know to one day be a samurai.
In exchange for this training, the wakashu provided the samurai with a sense of honor and of duty as well as companionship.
When a boy reached puberty, he could become a wakashu. All samurai took wakashu regardless of social class or standing and it was considered suspicious not to do so, but it was the boy that approached the warrior. According to an 18th-century manual:
A young man should test an older man for at least five years, and if he is assured of that person’s intentions, then he too should request the relationship… If the younger man can devote himself and get into the situation for five or six years then it will not be unsuitable.
If he agreed to take on a wakashu, the samurai held him under his care in a "brotherhood contract" until the former came of age, usually around 18 years old. There were instances of the two men continuing on their relationship after the younger reached adulthood, however.