I have usually had sex with guilt, often with pleasure, and, every now and then, with a sense of mystery and awe. In the last case, the wonder came from putting my queer body in, around, or against another queer body to experience and affirm each other’s very real desire. Those instances created, or uncovered, something deep and powerful, personal and mutual. Something real. Something magic.

As a queer person, I thought for a long time that the sex I had wasn’t “real sex.” The ways I had sex were not accepted by the culture I was raised in—or by myself—so I felt they were somehow invalid. Attraction and shame became flip sides of the same coin.

I have often looked to magic to help me find relief from the damage surrounding my queerness inflicted by both sex and culture. I talked to five queer witches about how to use sex magic to heal. What I found is that, in magic as in medicine, what seems like the poison is often the cure: The queer sex that made me feel shame can be transformed into something that helps me heal from that shame.

The purpose of sex magic is to harness the energy created during sexual exchanges and focusing it toward a desired result or intention. Those can be whatever you like: Some witches I spoke with used sex magic to alter their appearances, get jobs, and cut cords with negative people. “There is an amplified intensity to sexual interaction that is sacred and primal,” says AJ Durand, a New Orleans–based esoterica teacher. “Ritual sex magic can be an open forum of intention and a tool of enlightenment.”

You don’t need a partner to work toward these kind of results—nor do you need to have intercourse. “Some people [practice sex magic] when they masturbate,” says Ruby Wolfe, who runs the witchcraft school NOLA Esoteric and Sabbath Wolfe. “I find it a lot easier when there’s another person—I like to play off of their energy,” she says, “But it can be as simple as touching.”