It’s perhaps one of the most recognizable guitar riffs in popular music — those six identical notes followed by one a fourth down. But the impromptu recording session that created the hit “Under Pressure” was packed with tension between David Bowie and Queen, especially Freddie Mercury.

“Freddie and David locked horns, without a doubt,” Queen guitarist Brian May told MOJO magazine in 2017. “But that’s when the sparks fly and that’s why it turned out so great.”

Not only did the 1981 track become a worldwide sensation, reaching No. 1 on U.S. and UK charts, but it’s also shown its permeance in pop culture throughout the generations with the riff’s sampling in Vanilla Ice’s “Ice Ice Baby” (which led to a copyright infringement case settled out of court — and Bowie and Queen getting songwriting credit on the track) as well as covers by My Chemical Romance and The Used in 2005 and Shawn Mendes and Teddy Geiger in 2018.

But it all started with a chance get-together in a small town in Switzerland.

Queen and Bowie were neighbors in Switzerland

During their most prolific decade in the 1970s, Queen spent much of their time songwriting at the small Mountain Studios in Montreux, Switzerland, sitting on the eastern end of Lake Geneva. They loved the space so much, the band bought the studios and worked there throughout Mercury’s life.

Meanwhile, Bowie had independently also settled just north of there in Vevey.

“Since we already knew him a little, he popped in to say hello one day while we were recording,” May wrote in Mirror in 2016, following Bowie’s death. “Now time dims the memory a little, but the way I remember it, we all very quickly decided that the best way to get to know each other was to play together.”

Little did the “sleepy little town,” as he described it, know what was about to happen.

The musicians decided to 'knock things around'

The five musicians picked up their instruments. “We had fun kicking around a few fragments of songs we all knew,” May remembered. “But then we decided it would be great to create something new on the spur of the moment.”

“They just started knocking things around,” said Peter Hince, who was part of Queen’s road crew, according to the Guardian. “They … performed some original songs they did together and also covers. They were just jamming in the studio and it all got recorded – ‘All the Young Dudes’, ‘All the Way from Memphis’ and various rock classics.”

But it was when a certain guitar riff was played that inspiration hit. “We all brought stuff to the table, and my contribution was a heavy riff in D which was lurking in my head,” May continued. “But what we got excited about was a riff which [John Deacon] began playing.”

Queen in 1981 Photo: Koh Hasebe/Shinko Music/Getty Images

There were discrepancies over the famous riff

But it wasn’t all work, no play. “Suddenly hunger took over and we repaired to a local restaurant for food and a fair amount of drink,” May recalled. “A couple or three hours later, we’re back in the studio. ‘What was that riff, you had, Deacy?’ says David B. ‘I was like this,’ says John Deacon.”

But Bowie protested: “No it wasn’t, it was like this.”

“This was a funny moment because I can just see DB going over and putting his hand on John’s fretting hand and stopping him,” May continued to the Mirror. “It was also a tense moment because it could have gone either way.”

Those strong opinions continued dominating. “It wasn't easy because we were all precocious boys and David was very... forceful, yes,” May told MOJO.

PHOTOS: Freddie Mercury's Most Iconic Looks 10 Gallery 10 Images

Bowie encouraged the group to trust their instincts and sing the first thing that came into their heads

With the riff settled, Queen would have normally moved on to their next step: mapping out a song structure. But Bowie stepped in.

“David said something like, ‘We should just press on instinctively. Something will happen,’” May wrote in the Mirror. “And he was right. It did. I put a little tinkling guitar riff on top of John’s bass riff. (David later was adamant it ought to be played on a 12-string, so I overdubbed that later at some point.)”

By the time they got through the instrumentation, they knew they were onto something. “At this point there is no song … no vocal, no words – no title even – no clue as to what the song will mean – just an instrumental backing track,” he said. “But it really rocked. Born completely spontaneously, it was fresh as a daisy.”

While that seemed like yet another natural stopping point, Bowie instructed them to continue trusting instinct.

“The procedure was each of us went into the vocal booth consecutively, without listening to each other and listening to the track, vocalised the first things that came into our heads, including any words which came to mind, working with the existing chord structure,” May described.

All the bits were then mixed and matched to create a single track using the best sections. Sure enough, some of Mercury’s most standout “de dah day” came out of that process. “It came out pretty strange, but very different,” he said. “We all went home that night with a rough mix which was provisionally called ‘People on Streets’, because these words were part of the rough.”

David Bowie in 1990 Photo: Dave Hogan/Hulton Archive/Getty Images

Bowie had a 'genius moment' while recording, so Queen 'backed off'

The next morning, Queen was prepared to continue working through the rough draft, but Bowie stepped in. “David was in there first and told us he wanted to take the track over, because he knew what he wanted it to be about,” May said. “We all backed off and David put down a lyric which now focused on the ‘Under Pressure’ part of the existing lyric.”

May admits the behavior wasn’t typical of Queen: “It was unusual for us all to relinquish control like that but really David was having a genius moment because that is a very telling lyric. And the rest is history?”

While the song was, in essence, complete, the mixing still had to be done — and tensions continued. “I wasn’t there, so all I know is that Freddie and David had different views of how the mix should be done, and the engineer didn’t completely know how the studio worked,” May added. “So it ended up as a compromise.”

There are unreleased collaborations between Queen and Bowie

Looking back on the tense times, May chooses the remember the positive, especially after Mercury died of AIDS in 1991 and Bowie died of liver cancer in 2016. “It was sort of wonderful and terrible," he said of the sessions. “But in my mind, I remember the wonderful now, more than the terrible.”

As for those other tracks that were laid down during the initial jam session? May has confirmed their existence. “Not all of what we did in those sessions has ever come to light, so there's a thought,” he hinted to MOJO.

“There’s stuff with Freddie and David singing together – proper full-length rock’n’roll tracks — raw, but good,” Hince added. “David did vocals on some of the other tracks which ended up not being used. So somewhere there is an archive.”

“It was all quite spontaneous. It was one of those rock’n’roll moments,” Hince said, noting he was in the studio while they were recorded. “Pretty raw, but original material definitely. They were just incredibly spontaneous, good musicians. I can categorically say I know that there were complete tracks, not mixed tracks, but fully formed songs that were done. Does it belong to the David Bowie estate or to Queen? That’s probably part of the reason these things have never come to light.”