By 1976, David Bowie’s life in Los Angeles was in free fall. Though "Fame" and "Golden Years" were Top 10 hits the year before, Bowie was lost in a haze of cocaine addiction. To escape the drug scene in L.A., Bowie and wife Angela headed for Europe; after stops in Switzerland and France, Bowie settled in Berlin, a city then still divided by the Berlin Wall. The next three years would be one of Bowie’s most productive periods, as he recorded a trio of albums that became known as his Berlin Trilogy. Low and Heroes debuted in 1977, with Lodger arriving two years later.

“Life in L.A. had left me with an overwhelming sense of foreboding,” Bowie told Uncut. “I had approached the brink of drug-induced calamity one too many times, and it was essential to take some kind of positive action. For many years Berlin had appealed to me as a sort of sanctuary-like situation. It was one of the few cities where I could move around in virtual anonymity. I was going broke; it was cheap to live. For some reason, Berliners just didn't care. Well, not about an English rock singer, anyway.”

Angela Bowie, in Backstage Passes: Life on the Wild Side with David Bowie, said that “Berlin called to him in other ways. He chose to live in a section of the city as bleak, anonymous, and culturally lost as possible: Schoneberg, populated largely by Turkish immigrants. He took an apartment above an auto parts store and ate at the local workingmen’s cafe. Talk about alienation.”

Bowie was joined in Berlin by Iggy Pop, who was battling his own issues with heroin. Bowie would produce Iggy’s solo albums The Idiot and Lust for Life in 1977. Brian Eno of Roxy Music and longtime Bowie producer Tony Visconti also came to Berlin; they would contribute to all three of Bowie’s subsequent Berlin projects.

“Working with Bowie is much more than going to a studio,” Visconti said in an interview with Sound on Sound. “It's a social event, too. We would eat together, go to shows together, go to clubs together, and really soak in the local culture. That was always his way of working."

Listen to David Bowie's 'Sound and Vision'

For Low and Heroes, Bowie shifted to ambient music, focusing on tone and atmosphere rather of traditional rock riffs. It wasn't until Lodger that Bowie returned to guitar-based rock. Sales of the albums were respectable but disappointing to RCA Records, because they failed to spin off any hit singles in the U.S.

Bowie told NYRock that despite his drug problems, Low “was a relatively straight album. It didn't come from a drug place. And I realized at the time that it was important music. It was one of the better things I'd ever written – Low, specifically. That was the start, probably for me, of a new way of looking at life.”

Recorded in France and Germany, the album’s spacey effects were largely created by Eno, who played a portable EMS Synthi A synthesizer. Visconti used an Eventide Harmonizer to alter the sound of the drums; the producer claimed the audio processor “f–s with the fabric of time.”

“It wasn't a difficult album to make; we were freewheeling, making our own rules,” Visconti told Uncut. “But David was going through a difficult period, professionally and personally. To his credit, he didn't put on a brave face. His music said that he was ‘low.’ Despite a few really bad days we had quite a lot of fun making Low, especially when all the radical ideas were making sense and things were starting to click.

"I remember after a couple of weeks of recording, I made a rough mix of the entire album so far and handed a cassette of it to David. He left the control room waving the cassette over his head and grinned ecstatically saying, ‘We've got an album; we've got an album.’”

Watch David Bowie's 'Heroes' Video

Guitarist Robert Fripp of King Crimson provided a harder-edged sound on Heroes. Quotation marks were used around the title to express irony. Like Low, Heroes was recorded at Hansa Studios, known at the time as “Hansa by the Wall” for its proximity to the imposing structure that divided West from East Berlin. The view from the control room would inspire Bowie to write the title track.

“I always said it was a couple of lovers by the Berlin Wall that prompted the idea,” Bowie told Performing Songwriter in 2003. “Actually, it was Tony Visconti and his girlfriend. Tony was married at the time. And I could never say who it was. [Laughs.] But I can now say that the lovers were Tony and a German girl that he’d met whilst we were in Berlin.”

“It was much harder working on Heroes than Low,” Eno told NME. “The whole thing, except "Sons of the Silent Age," which was written beforehand, was evolved on the spot in the studio. Not only that, everything on the album is a first take! I mean, we did the second takes but they weren't nearly as good. It was all done in a very casual kind of way.”

Eno also offered an insight on Bowie's habits. “He gets into a very peculiar state when he's working. He doesn't eat. It used to strike me as very paradoxical that two comparatively well-known people would be staggering home at six in the morning, and he'd break a raw egg into his mouth and that was his food for the day, virtually.” Even though Heroes has become one of Bowie’s signature tunes, the single did not crack the Top 100 when it was released.

Listen to David Bowie's 'Fantastic Voyage'

After spending much of 1978 touring to support Low and Heroes, Bowie began work on Lodger, a concept album about a homeless traveler. Recorded in Switzerland and New York City, Lodger abandoned the low-key instrumentals of the first two albums and incorporated New Wave and world music into a pop format. Adrian Belew took over for Fripp on guitar.

Experiments included playing "All the Young Dudes" backwards, and having musicians trade instruments.

“I think Tony lost heart a little, because it never came together as easily as both Low and Heroes had,” Bowie told Uncut. “This had a lot to do with my being distracted by personal events in my life, and I would still maintain though that there are a number of really important ideas on Lodger.

By the early '80s, Bowie decamped Berlin for New York City. But he remained committed to the music of the Berlin Trilogy. “For whatever reason, for whatever confluence of circumstances, Tony, Brian and I created a powerful, anguished, sometimes euphoric language of sounds," Bowie once said.

"In some ways, sadly, they really captured, unlike anything else in that time, a sense of yearning for a future that we all knew would never come to pass. It is some of the best work that the three of us have ever done. Nothing else sounded like those albums. Nothing else came close. If I never made another album, it really wouldn't matter now. My complete being is within those three. They are my DNA.”