Get the history behind the Comics Code Authority and how it kept some characters out of mainstream superhero stories for more than three decades.

From 1954 to 1989, mainstream U.S. comic books had rules against portraying LGBT characters, enforced by the organization known as the Comics Code Authority. The Code, as it was often simply called, was not technically government censorship, as it was a private organization and publishers were not legally bound to follow its decisions.

But newsstands and shops weren’t going to risk carrying a comic book without the Code’s approval any more than large commercial movie theaters are anxious to show films that don’t have some rating and approval from the MPAA. Because of this, mainstream comic stories were restricted for decades, and it wasn’t until 1989 that a gay, bi, queer or transgender superhero was allowed to openly appear in mainstream American comic books produced by companies such as Marvel and DC.

The American comic book industry began in the 1930s and the superhero genre truly took off after Superman’s debut in “Action Comics #1” in 1938. Following WWII, superheroes fell out of popularity and by the 1950s most had vanished, to be revived or reimagined in later years when the Atomic Age and the Space Race inspired new imagined threats and horizons. The U.S. began to experience a newfound fear of communism and anything that threatened “traditional American values.”

READ MORE: Fear of a Gay Batman Brought Batwoman to Life

Ten years after Superman’s debut as the “champion of the oppressed,” psychiatrist Dr. Frederic Wertham began writing and speaking publicly about how mass media—particularly comic books—could corrupt American children. He specifically targeted horror comics and, to a lesser degree, superhero stories for allegedly containing subversive messages encouraging crime, violence, loose sexual morals, anarchy, homosexuality and a confusion of gender roles.

He stirred up a lot of hate and fear towards comic books, and groups of concerned parents and others who believed these stories threatened “traditional” American values joined Wertham’s cause, even holding comic book burnings in the street.

Senators Thomas D. Hennings, Estes Kefauver, Robert C. Hendrickson and Ricard Clendenen, look over sample covers of comic books at a New York hearing of a Senate sub-committee. (Credit: Bettmann/Getty Images)

In 1954, Dr. Wertham published the now-infamous book Seduction of the Innocent wherein he said, “I think Hitler was a beginner compared to the comic-book industry.” The book presented his conclusions based on his own research with children, and included comic book panels and dialogue, but many of these examples were taken out of context and in some cases outright misrepresented.

In 2013, Carol Tilley, a professor of library and information science at the University of Illinois at Urbana-Champaign, went through Wertham’s research and found that he had falsified some of his research, altering testimony and data in order to support his conclusions. But In the 1940s and 50s, this was not yet known nor even suspected by those who heard Wertham’s message and accepted it.

Soon after the publication of Seduction of the Innocent, Wertham spoke before the Senate Subcommittee on Juvenile Delinquency and testified that comic books were a major cause of juvenile crimes. There was no ruling advocating government intervention or censorship, but the subcommittee report stated that the comic book industry needed to address how their stories could adversely affect the American public.

In response, the Comics Magazine Association of America formed as a new industry trade group, and created the Comics Code Authority. The Code had many rules on how characters could appear physically, how violence was to be handled and how authority and government figures could be portrayed. Supernatural beings (except for sorcerers and magic-users who did not invoke the Devil) were banned. Unless it involved super-powers or impossible technology, you could not show how crimes were committed. Drugs were banned entirely. And three rules dealt with how sex and love were to be portrayed:

“Illicit sex relations are neither to be hinted at or portrayed. Violent love scenes, as well as sexual abnormalities are unacceptable.”

“The treatment of love-romance stories shall emphasize the value of home and the sanctity of marriage.”

“Sex perversion or any inference to same is strictly forbidden.”

You might wonder, what was the Code’s definition of “sex perversion” and “sexual abnormalities”? What was the line for what makes a sex relation “illicit”? Well, all of that was up to the Comics Code Authority Administrator or whomever was working in the office that day. There were no written definitions, no list of previous rulings to argue precedent. They would tell you if something was unacceptable and that was usually that.

Charles F. Murphy, poses in front of two illustrations showing the changes in a comic strip character due to the comic book code. (Credit: Bettmann/Getty Images)

Put together, these three rules on love and sex meant that LGBT characters were out of mainstream comics. A year before the Code came into being, “Space Adventures #3” from Charlton Comics depicted a scientist who undergoes sex reassignment surgery. This story, likely inspired by the recent news surrounding Christine Jorgensen, who underwent the procedure in Denmark, would now be prohibited from being published under the Code.

Under the Code, Catwoman was not an appropriate love interest for Batman since she was a criminal. But DC felt a love interest was needed to combat Wertham’s accusations that the adult Bruce Wayne and his adopted adolescent ward Dick Grayson were in a sexual relationship. So Catwoman was dropped from the comics and would not appear again until 12 years later in 1966, while Batman met new love interest Kathy Kane AKA Batwoman in 1956. Later on, her niece Betty Kane became Bat-Girl in order to win Robin’s heart.

In 1971, several of the Code’s guidelines were revised and a few were dropped, ushering in a new wave of social commentary stories and supernatural characters, but LGBT content was still out of bounds. This, of course, did not stop fan speculation. In 1979, Marvel introduced a team called Alpha Flight. When the team later got its own series, co-creator John Byrne decided that Alpha Flight member Jean-Paul Beaubier, also called Northstar, was gay. However, he did not reveal this directly in the stories, both due to the code and, as he claims, due to then Marvel Editor-in-Chief Jim Shooter personally telling him this would not be allowed.

While superheroes and villains weren’t allowed to be directly identified as LGBT, Marvel and DC could get around this by producing special books with a “mature readers” label. In the mainstream comics, supporting characters had a little more freedom.

In “Captain America #268” (1982), by writer J.M. DeMatteis and artist Mike Zeck, readers met Arnie Roth, a childhood friend who never married because relationships never seemed “right,” but had found happiness in the company of Michael Blech, his “best friend” and roommate. Later, Arnie and Michael share an emotional embrace, and Cap has a realization, leading him to think about how important it is to reach out to those you love, despite whatever fears you may have. He later remarks how lucky Arnie is to have found Michael.

Charles F. Murphy, Code Administrator of the Comics Magazine Association of America, holding a group of “approved” comic books in 1954. (Credit: Bettmann/Getty Images)

It is worth noting that 1982, the year that Captain America learned and accepted that his childhood best friend was gay, was the same year that the medical community officially adopted the acronym AIDS to replace unofficial, idiomatic terms like “gay cancer,” “gay plague” or even GRID (Gay-Related Immune Deficiency).

In 1987, Superman met tough as nails Metropolis cop Maggie Sawyer who lived with a woman and later admitted that she had spent years trying to deny feelings “a proper Catholic girl didn’t even want to consider,” feelings that she ultimately had to accept. The meaning was clear and Superman had nothing but sympathy for her.

In 1989, the Code was altered yet again and dropped its rules against LGBT content (it would essentially cease to exist by the end of the 20th century.) That same year, DC at last confirmed that Wonder Woman’s home of Themyscira, also called Paradise Island, included women who were in romantic and/or sexual relationships with each other. Stories in the 1940s had occasionally implied that Wonder Woman had romantic interest in women, and 2016’s “Wonder Woman Year One” by Greg Rucka and Nicola Scott confirmed that she had dated women before leaving for adventures in “Patriarch’s World.”

More than two decades after his introduction, Alpha Flight’s Northstar finally came out to the public in 1992, followed a few months later by Element Lad learning his girlfriend Shvaughn was a transwoman. More openly LGBT characters followed. In 2006, 50 years after she was introduced to quell accusations that Batman was gay, a new version of Batwoman named Kate Kane was introduced as an openly gay hero who had left West Point due to “Don’t Ask, Don’t Tell.”

READ MORE: Once Banned, Then Silenced: How Clinton's 'Don't Ask, Don't Tell' Policy Affected LGBT Military

In recent years, Thor’s step-brother Loki has been redefined as genderfluid (which is closer to how the Loki of mythology was), the heroic Shining Knight was reimagined as a transgender character, Batgirl has had a transgender roommate, former Batman villains Harley Quinn and Poison Ivy are in a non-monogamous romantic relationship and Marvel’s America Chavez is a lesbian adventurer with her own comic series.

But despite these changes, there is still a way to go for some mainstream comics. To this day, nearly all bisexual, intersex and transgender characters in mainstream superhero comics are either aliens, inhabitants of a parallel Earth, shape-shifters or all of the above, as if a science fiction upbringing or alternative biology is needed to explain and understand them—even in stories that already easily accept things such as heat-vision, telepathy and living computers.

But with new, younger creative voices rising and with independent comic publishers now regarded with the same legitimacy as Marvel and DC, evolution is inevitable as comics move into the future.

Alan Kistler is a comic book historian and author of the bestseller “Dr. Who: A History.”