VILLUPURAM, India — Only two days to go before the start of religious festivities at the 2014 Koovagam festival, India’s largest gathering of transgender women, and countless used condoms lie scattered across a garbage-covered field. By 10 that night, the grounds will be filled by a hundred or more transgender sex workers plying their trade for 200 rupees per session, or a little over $3.

The trans community in India made headlines this past April thanks to a much-celebrated Supreme Court ruling that provided recognition to a “third gender” on official documents such as voter ID cards. The decision could potentially lead to the reservation of government jobs for transgender people and legal guarantees of educational rights in the future. In the meantime, the vast majority of India’s estimated 1 million-plus trans women are relegated to begging and sex work to earn a living. With no legal protection against discrimination from employers and little emotional support from family members (who often cast them out), trans women — also known as hijras or aravanis — typically live on the fringes of Indian society.

One of the earliest references to India’s “third gender” can be found in a chapter of the Kama Sutra that instructs “eunuchs” on the most effective way to pleasure a man through oral sex. According to newspaper articles and AIDS-focused nonprofits, the first HIV/AIDS cases in India were reported in the 1980s. The female trans community has taken the heaviest hit, with a rate of infection somewhere between 17 and 41 percent — close to 100 times higher than the national average (around 0.36 percent).

Every year, tens of thousands of people — mostly trans women but also many tribal men — congregate at Koovagam, galvanizing this otherwise sleepy town in the southern Indian state of Tamil Nadu. The women are there to make new friends, earn money through sex work and achieve spiritual cleansing through Hindu rituals. The atmosphere is part carnival, part intimate community, as celebrants from all over the country come together to gossip, party and participate in beauty pageants and talent competitions. The meeting halls are adorned with AIDS ribbons, and food stalls earn double or triple their usual daily revenue thanks to winding lines of sweaty customers. Bootlegged liquor abounds, and, too often, arguments escalate into fisticuffs.