Here’s a little-known pop-diva fact: Madonna used to have nightmares about Whitney Houston. In a 1995 “Primetime Live” interview, she described a dream she had in which she learned that her greatest ’80s chart rival’s then-latest single, “Exhale (Shoop Shoop),” had replaced hers, “You’ll See,” at No. 1. Meanwhile, in another room, her music teacher was humming Houston’s hit. Cue cold sweat. (Dreams don’t always come true: In real life, “You’ll See” never made it past No. 6.)

If Madonna is still watching the charts like a hawk, even in her sleep, she’s clearly no longer obsessed with ruling them. In a 36-year recording career that has found the 60-year-old walking more tightropes than the average A-list pop superstar, Madonna has delivered her most uncompromising musical statement yet with her 14th album, “Madame X.”

The rebel heart she claimed to have in the title of this album’s 2015 predecessor is beating more loudly and passionately than ever before. Freed from the need to be number one with a bullet, Madonna finally has released an entire album that lives up to her reputation as one of pop’s greatest risk-takers.

The first single, “Medellín,” is a deceptively lovely opening statement that only hints at the fire raging just ahead. The comparisons that have been made to an earlier Madonna single, “La Isla Bonita,” aren’t far off, but “Medellín,” named for Colombia’s second-largest city, has sharper edges, and its Latin swirl is more jagged. Colombian reggaeton rapper Maluma adds sexual tension to the mix, and when Madonna sings “Ven conmigo, let’s take a trip,” she sounds as inviting as she did cooing about the tropical island breeze in 1987.

After that, true weirdness sets in. “Dark Ballet” and “God Control” are ambitious and sprawling, the closest Madonna may ever come to her own “Bohemian Rhapsody.” “Dark Ballet” goes from piano ballad to electro-gospel dirge with a left-field interpolation of “The Nutcracker Suite: Dance of the Reed Flutes” that feels like Tchaikovsky on mushrooms. It’s a pretty daring musical move to make only two songs in.

And then, re-enter Madonna, political rabble-rouser, the woman we first caught a glimpse of on 2003’s “American Life.” Although she never name-drops on “God Control,” which veers from mournful to hopeful to defiant in the space of its six minutes and 30 seconds, the song is emblazoned with the spirit of anti-Trump. “This is a wake-up call,” she sings under a shimmering strobelight groove, not long after admitting, “I think I understand why people get a gun.” Not that she’s really about to join the right-to-bear-arms troops; as she later raps, “The only gun is in my brain.”

“God Control” sets the primary doom-and-gloomy, politicized lyrical mood of “Madame X.” Her head may be locked and loaded, but that doesn’t mean she’s about to give Michelle Obama a run for her eloquence. Lyrically, Madonna’s political manifestos are no more sophisticated than they were 16 years ago. Her activism may be in the right place, but jejune clichés like “Open your mind” (on “Future”), “Life is a circle” (on “Extreme Occident”) and “Died a thousand times” (on “Rise”) go low when she should be aiming higher.

“Killers Who Are Partying” epitomizes Madonna’s trouble with words. “I know what I am, and I know what I’m not,” she sings, as if all too aware that she’ll be excoriated and nailed to the cross for swerving way outside of her lane with lyrics like “I will be gay, if the gay are burned / I will be Africa, if Africa is shut down / I will be poor, if the poor are humiliated.”

In her defense, it would be a somewhat unfair crucifixion. Madonna wasn’t always a rich, white woman. She came from nothing and triumphed, against all odds, in an industry ruled by predatory alpha males. Just because she now lives in the penthouse doesn’t mean she doesn’t remember what it felt like to be the girl from the gutter, or that she can’t express empathy and solidarity without pity.

Thankfully, the Midas touch of her old collaborator Mirwais still sparkes. He shares “Madame X” production credits with Mike Dean, Diplo, Billboard, Jason Evigan and Jeff Bhasker, and they’ve crafted solid state-of-the-art backdrops for Madonna’s musings. The electro gurgles, worldbeat flourishes and Madonna’s still-effective vocal presence (occasionally courtesy of AutoTune) make these 15 songs sing.

“Madame X” is best, though, not when it goes all CNN on us but when it plays primarily like a musical travelogue, taking us to magical mystical places so fascinating that we might not even notice the stormclouds overhead. The electronic cha-cha swing of “Medellín” sounds like it was sun-kissed on the Cartagena coast before taking the love train south. “Batuka,” one of the album’s highlights, kicks off with Burundi-ish drumming and settles into a tribal rhythm that beats like Paul Simon’s “Graceland” relocated from Africa to South America.

The lyrical conceit of “Killers Who Are Partying” might have stopped it dead in its tracks if it weren’t for the fado flourishes that flutter over it like a ribbon of darkness. No one will ever mistake Madonna for fado legend Amalia Rodrigues, but if she were singing in Portuguese, “Killers” wouldn’t sound so out of place on a Madredeus album. She’s been spending a lot of time in Lisbon, and the Portuguse influence is all over “Madame X.”

She and Brazilian pop superstar Anitta perform “Faz Gostoso” mostly in Anitta’s native tongue, and the reggaeton jam is the best of the album’s five vocal mash-ups. Anitta offers a far more interesting female counterpoint to Madonna than her previous distaff collaborators Britney Spears (on “Me Against the Music”) and Nicki Minaj and M.I.A. (on “Give Me All Your Luvin’”).

Despite frequent forays into foreign languages (Spanish and Portuguese), “Madame X” isn’t all musical exoticism. The white-girl hip-hop of “Crave” wouldn’t sound out of place on Ariana Grande’s latest album, and if it weren’t for the line “I’ll bend my knees for you, like a prayer” (one of several musical nods to the 30-year-old smash), “Crazy” could be a lost J.Lo ballad, which is not a good thing.

“Like a Prayer” is the strongest musical antecedent here, but “Madame X” is packed with meta-Madonna moments. In addition to the lyrical “Prayer” nod on “Crazy,” “God Control” and “Batuka” feature backing choirs right out of the “Prayer” outro, while “Future” quotes “Don’t Tell Me” from 2000’s “Music.” “Extreme Occident” moves the self-referencing inward, chronicling Madonna’s journey from “the far right … to the far left” and “from the Midwest … to the Far East.” It’s a tad clunky, but then the singer’s trajectory has been, too.

Not surprisingly, when introspective Madonna gives in to the dance diva within, “Madame X” is a smoother ride. If pop radio were more hospitable to galloping robo-pop techno punctuated by mariachi horns and sung by women over 50, “Come Alive” might be an anthem of the summer. And for those who miss her confessions on a dance floor, “I Don’t Search, I Find” is pure ’90s disco bliss, the album’s only non-stop party.

But you likely won’t hear any of this playing on a radio near you. That’s what makes “Madame X” Madonna’s best album since “Confessions on a Dance Floor.” She’s confessing again, but this time, she’s not interested in editing herself for mass consumption. “Bitch I’m Loca” she announces on the album’s second Maluma duet (not to be confused with “Bitch I’m Madonna” from “Rebel Heart”). She’s not kidding, and her crazy is an incredible sound.

Madonna

“Madame X”

Interscope Records