Asking your partner to tie you to the bedpost, telling them to slap you hard in the throes of lovemaking, dressing like a woman if you are a man, admitting a fetish for feet: Just a few years ago, any of these acts could be used against you in family court.

This was the case until 2010, when the American Psychiatric Association announced that it would be changing the diagnostic codes for BDSM, fetishism, and transvestic fetishism (a variant of cross-dressing) in the next edition of its Diagnostic and Statistical Manual of Mental Disorders (DSM), published in 2013. The new definitions marked a distinction between behavior—for example, playing rough—and actual pathology. Consenting adults were no longer deemed mentally ill for choosing sexual behavior outside the mainstream.

The change was the result of a massive effort from the National Coalition for Sexual Freedom (NCSF), an advocacy group founded in 1997 “to advance the rights of and advocate for consenting adults in the BDSM-Leather-Fetish, Swing, and Polyamory Communities.” At the time, these types of sexual behavior, by virtue of their inclusion in the DSM, were considered markers of mental illness—and, as a result, were heavily stigmatized, often with legal repercussions. In family court, an interest in BDSM was used as justification to remove people’s children from their custody.

“A sexual sadist practices on non-consenting people,” explains NCSF founder Susan Wright, while “someone who is kinky is having consensual enthusiastically desired sex.” The problem with the earlier DSM: It didn’t draw a distinction between the two. A 1998 survey from the NCSF found that “36 percent of S&M practitioners have been victims of harassment, and 30 percent have been victims of discrimination.” As a result, the organization’s website says, “24 percent [have lost] a job or a contract, 17 percent [have lost] a promotion, and 3 percent [have lost] custody of a child.”

“We were seeing the DSM used as a weapon,” says Race Bannon, an NCSF Board Member and the creator of Kink-Aware Professionals, a roster of safe and non-judgmental healthcare professionals for the BDSM and kink community. (The list is now maintained by the NCSF.) “Fifty Shades [of Grey] had not come along,” says Bannon, an early activist in the campaign to change the DSM. “[Kink] was still this dark and secret thing people did.”

Since its first edition was published in 1952, the DSM has often posed a problem for anyone whose sexual preferences fell outside the mainstream. Homosexuality, for example, was considered a mental illness—a “sociopathic personality disturbance”—until the APA changed the language in 1973. More broadly, the DSM section on paraphilias (a blanket term for any kind of unusual sexual interest), then termed “sexual deviations,” attempted to codify all sexual preferences considered harmful to the self or others—a line that, as one can imagine, is tricky in the BDSM community.

The effort to de-classify kink as a psychiatric disorder began in 1980s Los Angeles with Bannon and his then-partner, Guy Baldwin, a therapist who worked mostly with the gay and alternative sexualities communities. Bannon, a self-described “community organizer, activist, writer, and advocate” moved to Los Angeles in 1980 and soon became close with Baldwin through their mutual involvement as open participants in and advocates for the kink community. “I’m fairly confident that I was the first licensed mental-health practitioner anywhere who was out about being a practicing sadomasochist,” Baldwin says.

The pair was spurred to action after the 1987 edition of the DSM-III-R, which introduced the concept of paraphilias, changed the classifications for BDSM and kink from “sexual deviation” to actual disorders defined by two diagnostic criteria. To be considered a mental illness, the first qualification was: ‘‘Over a period of at least six months, recurrent, intense sexual urges and sexually arousing fantasies involving the act (real, not simulated) of being humiliated, beaten, bound, or otherwise made to suffer.’’ The second: ‘‘The person has acted on these urges, or is markedly distressed by them.’’

“1987 was a bad shift,” Wright recalls. “Anyone who was [voluntarily] humiliated, beaten, bound, or any other alternate sexual expression was considered mentally ill.”

With the new language, Baldwin says, he quickly realized that laws regarding alternative sexual behavior would continue to be problematic “as long as the psychiatric community defines these behaviors as pathological.”

“I knew there were therapists around the world diagnosing practicing consensual sadomasochists with mental illness,” he says.

At the time that the new DSM was published, Baldwin and Bannon were planning to attend the 1987 march on Washington, D.C., in support of gay rights; after the new criteria came out, they decided to host a panel discussion for mental-health professionals in the State Department auditorium, where they announced the launch of what would come to be known as “The DSM Revision Project.”

“We asked how many people in the room were mental-health professionals,” Baldwin says, and “two-thirds of the people in the room raised their hands. And we said, ‘The way this needs to happen is, licensed mental-health practitioners need to write the DSM committee that reviews the language of the DSM concerned with paraphilias.’”

Around 40 or 50 people left the session with the information needed to write the letters. “We did not know exactly what would result,” Bannon recalls. “We did not think we would see dramatic changes suddenly.”

They didn’t—but the changes they did see were positive. The next edition of the DSM, published in 1994, added that to be considered part of a mental illness, "fantasies, sexual urges, or behaviors" must "cause clinically significant distress or impairment in social, occupational, or other important areas of functioning.”

“This was a definite improvement from the DSM-III-R,” says Wright, who later took over leadership of the DSM Revision Project from Bannon and Baldwin.

“These criteria gave [health professionals] wiggle room to say, ‘They have issues, but it is not about their kink. For the vast majority, it is just the way they have sex,’” Bannon explains. “Rather than saying, ‘Because you are into this method of sexuality, you are sick,’ [they could say], ‘Pathologically, if this impacts your life negatively, then you have a problem.’”

But the new language in the 1994 DSM also allowed for wiggle room of a different kind: The threshold of “significant distress” was often loosely interpreted, with the social stigma of kink, rather than kink itself, causing the negative impact on people’s lives. Workplace discrimination and violence were on the rise, according to a 2008 NCSF survey, and people were still being declared unfit parents as a result of their sexual preferences: Eighty of the 100 people who turned to the NCSF for legal assistance in custody battles from 1997-2010 lost their cases.

A few years after the 1994 DSM was published, Wright decided it was time to fight for another revision. When she founded the organization in 1997, the NCSF’s goal was a change to the APA’s diagnostic codes that separated the behavior (e.g., “he likes to restrict his breathing during sex”) from the diagnosis (e.g., “his desire to restrict his breath means that he must be mentally ill”). The next DSM, the group argued, should split the paraphilias from the paraphilic disorders, so that simply enjoying consensual BDSM would not be considered indicative of an illness.

Their efforts were largely ignored by the APA until early 2009, when Wright attended a panel discussion at New York City’s Philosophy Center on why people practice BDSM. Among the panelists was psychiatrist Richard Krueger, whose expertise included the diagnosis and treatment of paraphilias and sexual disorders.

During the meeting, Wright says, “I brought up the point that the DSM manual caused harm to BDSM people because it perpetuated the stigma that we were mentally ill. [Krueger] heard me and said that was not what they intended with the DSM.” Krueger, it turned out, was on the APA’s paraphilias committee, and following the meeting opened up an email dialogue between Wright and the other committee members, in which Wright provided documentation about the violence and discrimination kinky people experienced. “I credited that to the DSM,” she says. “Courts used it. Therapists used it. And it was being misinterpreted.”

Over the next year, “I sent him information, he gave it to the group, they asked questions, and I responded. It was very productive,” Wright recalls. “We [the NCSF] felt we were heard, we were listened to—and they took [our arguments] into account when they changed the wording” of the DSM in 2010.

Another major factor in the NCSF’s favor was a paper, co-written by sexual-medicine physician Charles Moser and sexologist Peggy J. Kleinplatz and published in 2006 in the Journal of Psychology and Human Sexuality, titled “DSM IV-TR and the Paraphilias: An Argument for Removal.” According to Wright, the paper, which “summed up opinions of mental-health professionals who thought you shouldn’t include sexual activity in the DSM,” played a significant role in the paraphilia committee’s eventual shift in language.

In February 2010 the proposed change was made public—clarifying, Wright says, that “the mental illness [depends on] how it is expressed, not the behavior itself.” The new guidelines drew a clear difference, in other words, between people expressing a healthy range of human sexuality (for example, a couple that likes to experiment, consensually, with whips, chains, and dungeons) and sadists who wish others genuine harm (for example, tying and whipping someone in a basement without their consent).

The DSM-5 was released in May 2013, its contents marking a victory for the NCSF, Bannon, and Baldwin. The final language states: “A paraphilia is a necessary but not a sufficient condition for having a paraphilic disorder, and a paraphilia by itself does not necessarily justify or require clinical intervention.”

“Now we are seeing a sharp drop in people having their children removed from their custody,” Wright explains. Since the change, according to the NCSF, less than 10 percent of people who sought the organization’s help in custody cases have had their children removed, and the number of discrimination cases has dropped from more than 600 in 2002 to 500 in 2010 to around 200 over the last year.

“The APA basically came out and said, ‘These people are mentally healthy,’” Wright says. “‘It’s had a direct impact on society.”