In 2014, photographer Mariette Pathy Allen made her first trip to Myanmar (also known as Burma), and attended the country’s biggest festival of spirit mediums. These practitioners of animism, a belief in the spirits of ancestors, animals, flora, and other objects, are a thriving minority in a society that is predominantly Buddhist. Allen observed that the spirit cults had an acceptance of gender variance that was mostly absent in the country at large. Over a series of trips to Mandalay, Myanmar, and Lampang, Thailand, where there are similar spiritual communities, Allen photographed the gender noncomforming spirit mediums and their vibrant ceremonies and festivals.

Transcendents: Spirit Mediums in Thailand and Burma, out now from Daylight Books, features 75 of Allen’s photographs with text from her collaborator, Eli Coleman, professor and director of the Program in Human Sexuality at the University of Minnesota. As Coleman explains in a book essay, he first encountered gender variance in Burmese spirit mediums in 1987, and then found an analogous phenomenon in Thailand. He was especially interested in these mediums because both countries have a societal stigma against gay and transgender people. Coleman writes:

Being a spirit medium trumps this stigmatized status, at least within the circle of believers. In the “safe spaces” of nat pwe and fawn phii festivals, open expression of female dress is socially sanctioned. And certainly, cross-dressing to dance for the female spirits (mainly in Burma) is a sanctioned activity as well. … In daily life, spirit mediums dress and live in all shades of gender expression, and most if not all admit to having a female gender identity to some degree.

The book follows Allen’s previous photographic series on transgender and cross-dressing people, including Transformations: Crossdressers and Those Who Love Them (1990), The Gender Frontier (2003), and TransCuba (2014). In a preface to Transcendents, transgender artist Zackary Drucker writes that the book “produces a cavalcade of luscious and saturated compositions steeped in magical spirit. To see trans folks living among their fellow country-people, fully integrated into the fabric of their communities and living openly, is a tremendous global model for all of us moving into the future.”

Coleman notes that in the past most Burmese spirit mediums were women. Over the past 50 years, as women gained more opportunities in their careers and education, more male-born mediums became part of this practice. And in these positions, they find not only acceptance of homosexuality and femininity, but economic and spiritual power. Allen’s photographs include portraits of mediums, scenes from the festivals where worship involves a visual cacophony of dancing, food, music, and color, and intimate shots of the mediums’ home altars. These are laden with candles, incense, and offerings which are intended to reinforce their connection to the spirits. Over her repeated visits, the New York-based photographer got rare access to these safe spaces for gender nonconforming individuals that have formed in a religious context.

Yet even with the centuries-old rituals and beliefs that endure as an alternative devotion in these majority Buddhist countries, there are plenty of 21st-century reminders in the photographs, with smart phones and motorcycles appearing in the frame. “As a westerner, I see this contrast as a confrontation between tradition and technology, but the spirit mediums themselves seem unaware of any discrepancy,” Allen writes. “They appear to be at peace with all the parts of themselves.”

Transcendents: Spirit Mediums in Thailand and Burma by Mariette Pathy Allen is out now from Daylight Books.