Prince in 1998, David Bowie in 1972 (Bertrand Guay/AFP/Getty Images; Brian Horton/AP)

America has certain hangups about gender and sexuality. David Bowie and Prince did not. The latter died Thursday, the former in January. In between, the states of North Carolina and Mississippi passed laws to preserve the male-female and gay-straight divides that both musicians pulverized and then rebuilt as a tombstone to gender norms, machismo and identity politics.

Bowie and Prince were transgender, in that they transcended gender, and they became two of the brightest stars of the past 40 years. They are immortal. The rest of us are haggling over bathroom etiquette.

Bowie wore Spandex, lipstick, eyeliner. Prince wore earrings, sequins, cloaks. Bowie’s necklines plunged. Prince’s heels glittered. Bowie, a baritone, said he was bisexual and was married for over two decades to one of the world’s most beautiful women. Prince rode the updraft of his falsetto, kept his pencil mustache, perfected a pout that seemed pansexual, had relationships with a string of famous female entertainers, including Sheila E. and Kim Basinger.

Prince sang “Am I black or white, am I straight or gay?”

Bowie sang “She turns me on, don’t get me wrong” to a person named John.

They are worshiped as deities because they were unbound by the conventions that make the rest of us hopelessly human: race, gender, sexuality and so on.

It wasn’t always so. The world caught on only gradually.

“He resembles nothing so much as Donna Summer with a goofy mustache,” wrote The Washington Post’s Gary Arnold in his review of Prince’s image-making movie “Purple Rain.”

[Prince broke all the rules of fashion, and damn did he look good]

Is there anything gayer than the concept of purple rain? And yet you may see a scrum of straight guys, around last call, wail the chorus as they prop each other up.

“It’s time we all reach out,” Prince sang, “for something new.”

Prince “learned early on how little value to assign to someone else’s opinion of you,” wrote the rapper and songwriter Frank Ocean on his Tumblr, adding that he “made me feel more comfortable with how I identify sexually simply by his display of freedom from and irreverence for obviously archaic ideas like gender conformity etc.”

On stage, and through their music, Bowie and Prince didn’t go after women alone. They went after everybody. It was a mystical kind of lust.

Pop icon Prince passed away on April 21 at the age of 57. (Video: Erin Patrick O'Connor/The Washington Post)

“Hello, Washington,” Prince said teasingly, at a November 1984 show at the now-demolished Capital Centre. “My name is Prince. I’ve come to play with you.”

Oh have you?

“I . . . I will be king,” Bowie sang. “And you . . . you will be queen.”

And vice versa, no doubt.

Prince grew more religious in his later years. He was a deeply spiritual being who went door-to-door as a Jehovah’s Witness, who may have been against same-sex marriage (or at least harbored doubts about it. Could this be? If so, it was yet another act of rebellion against a certain kind of conformity).

[Raunchy Prince was actually a conservative Christian who reportedly opposed gay marriage]

On the title track of Bowie’s last album, released days before his death, he listed all the things he was not: “I’m not a film star,” “I’m not a pop star,” “I’m not a porn star.” Prince once referred to himself as what he wasn’t: “the artist formerly known as.”

I am not what you think I am, Bowie and Prince said, and I may be what you think I am not.

Musician David Bowie passed away on Jan. 10, after a battle with cancer. The end to his influential, decades-long career sparked messages of grief and tribute. (Video: Jenny Starrs/The Washington Post, Photo: SHAUN BEST/The Washington Post)

The most memorable drag performance I’ve ever seen was a rendition of Prince’s “The Beautiful Ones” by Kendra Kuliga, as drag king Ken Vegas, at the old BeBar on Ninth Street NW in 2008. After a few beats of the bass drum, the song bursts open with a string of strident chords on a synthesizer. At center stage, Ken pantomimed playing on a miniature piano that was four sizes too small, which made him seem larger than life. “Baby, baby, baby,” he lip-synced. “What’s it gonna be?” The answer: a woman performing as a man who was paying tribute to a man who was often quite womanly. As the song climaxed, with Prince screeching “Do you want him? Or do you want me?” Ken dropped to the ground and thrust his hips into the stage, daring anyone to resist his “I want you.” The coital choreography, the clashing imagery, the torchy music, the pretzeling of gender — it was Prince’s ethos made manifest, and taken to another level.

“He was the first artist to teach me to embrace both sides, male/female, and be okay with it,” says Kuliga, who performed “The Beautiful Ones” for 10 years in different venues and cities. “He brought together all races, all genders, the world.”

The pale alien from Brixton and the black man from Minneapolis had something in common, in that they had nothing in common with anyone. They stripped masculinity of its insecurities. They were beyond labels, immune to the generics of genre. They were born into a world that expects certain things and they spent their careers defying those expectations. Have you painted a perfect picture of the world you think you know? The beautiful ones always smash the picture. Always. Every time.

Read more:

Prince, legendary musician, dies at 57

Is Prince the best person who has ever done this whole music thing?

Help us celebrate Prince by annotating the lyrics of “Purple Rain”