“We wanted the album to be very extreme,” U2 guitarist the Edge told Redbeard of 1991’s Achtung Baby. “We didn’t want it to sound in any way safe.”

While the Irish quartet’s seventh LP eventually became yet another blockbuster, spawning a crop of hit singles and going eight-times platinum, that experimentation — that endless reactionary quest for a new sound — nearly halted the momentum of an all-time great rock band. And no song better captures that struggle than “Mysterious Ways,” the most drastic of their sonic departures.

“I was listening to a lot of really out-there, experimental dance music and hardcore guitar music, industrial music — I just really loved the energy of it, the sounds of it,” the Edge told Redbeard. “It’s music that really confronts you and challenges you, and I wanted some of those elements in what we were doing.”

Those two seemingly opposite vibes — harsh guitar tones and club-friendly beats — became the foundation of “Mysterious Ways.” U2 first started tinkering with the track at Dublin’s STS Studios, building on an improvisation they called “Sick Puppy,” with the Edge, singer Bono and bassist Adam Clayton jamming over a beat box pattern. They knew it had a central riff worth developing: Clayton’s primal bass groove, which previously emerged while recording their 1990 charity cover of Cole Porter’s jazz-pop tune “Night and Day.” But nothing else seemed to stick.

“‘Mysterious Ways’ was a bass line in search of a song,” singer Bono wrote in the band’s 2006 autobiography, U2 by U2. “But it was never much more than a one-note groove for a long time.” However, as with so many of their previous songs, the Edge lifted the idea by messing around with unusual guitar effects.

“Edge got a new pedal he was playing around with, making this envelope of sound which would turn a guitar chord into the funkiest of jackhammers,” Bono added. “I heard it from another room and ran in. I said, ‘What’s that sound?’ He said, ‘I don’t know, I’ve just come up with it.’ I said, ‘We need it for ‘Mysterious Ways.’”

They had two key pieces: Clayton’s seductive, repetitive bass line, and Edge’s aggressive, atomic wah, which hit with the intensity of a firing squad. But the band still flailed while pairing these parts into a proper song — particularly amid the tension of their sessions at Berlin’s Hansa Studios, intensely dissecting the arrangement with co-producer Daniel Lanois.

Watch U2's Video for 'Mysterious Ways'

Of course, they eventually got there: Edge landed on a more fleshed-out chord sequence; drummer Larry Mullen Jr. added in a live drum kit; and Bono arrived at a euphoric vocal melody, accentuated with a childlike cadence, and lyrics about “a man living on little or no romance.” (It was the Edge’s idea to add the “it’s all right” line, reasoning that, well, they’d never used that phrase before.) The end product added up to what Bono described as “U2 at our funkiest.”

“Sexy music. Sly and the Family Stone meets Manchester baggy,” he wrote in U2 by U2.

The “Mysterious Ways” single was issued on Dec. 2, 1991, paired with a music video featuring belly dancer Morleigh Steinberg (who later married the Edge). The song peaked at No. 9 on the Billboard Hot 100, making it U2’s fourth highest-charting track to date — naturally, it’s remained a set list staple ever since.

And the song’s signature wah-wah thwack remains a musical reference point, even for U2 themselves. In a fly-on-the-wall 2015 Rolling Stone piece documenting a tour rehearsal, Bono at one point stops the Edge, criticizing his “digital-sounding distortion” on the song “The Miracle (of Joey Ramone).”

“It’s not a sound that can lift,” the frontman says. “In the pre-chorus, is there a mezzanine level? You got a little brown sauce, so we need it more funky, more like ‘Mysterious Ways.’ Try it with the ‘Mysterious’ sound.”

Many others have tried to capture that elusive effect. Most have failed. But it’s all right. At least we have “Mysterious Ways.”

U2 Albums Ranked

U2 don't inspire weak reactions in people. There are passionate U2 fans, and passionate U2 haters, and very little in between.