On David Bowie's official website. There's a section where David responds to members' questions. Somebody asked him about the writing of Under Pressure, and I thought it would interest the folks over here:
Q: What was the real story behind the writing of "Under Pressure"? I've heard & read conflicting stories of Freddie Mercury writing it & inviting you along, of you being in the studio listening to Queen playing the riff and contributing the lyrics, of both you and Queen jointly writing the whole piece. Which of these, if any, is the real account?
A: The song was written from the ground up on the night I visited their studio. I believe the riff had already been written by Freddie and the others so then we jointly put together the different chord sections to make it a cohesive piece of music. Then Freddie and I came up with our individual top line melodies. So when you hear Freddie sing, that's what he wrote and when you hear me sing, that was mine. Then we worked on the lyrics together. I still cannot believe that we had the whole thing written and recorded in one evening flat. Quite a feat for what is actually a fairly complicated song.
Roger said he enjoyed playing it live cos it had so many different sections. Joma what are you on??? Ive been playing guitar for 12 years and still struggle my ass off with it! If you break it down when you listen to it, youll see how complex UP really is. Classic ;)
What a mystery! lol Who wrote the bass line? We've heard it was John, but then he himself said it was Bowie. Now Bowie says it was already written when he came in. Maybe the immortal bass line of Under Pressure should be regarded now as Traditional, arranged by Queen & Bowie!
Actually the bass line was written by Robert Van Winkle, otherwise known as 'Vanilla Ice'. I believe he was only 7 years old at the time.
A few years later Freddie somehow got ahold of a tape and was 'inspired' to build a song around it. When Bowie showed up, this was one of the ideas that just happened to come up.
Here is the seldom-heard original version of the Queen/Bowie version, before the bass line was slightly changed. The record companies were afraid of a lawsuit so it had to be altered slightly. link