John Meagher on the artists from U2 to Bowie who found inspiration in the German capital

It is the stuff of U2 legend. Anxious to reinvent themselves after the 1980s had seen them become the biggest band in the world - and the most po-faced - Bono and friends took one of the last ever flights into Berlin before it was officially reunified to try and hoover up some of the cultural gold dust that has long been associated with Germany's largest city - whether divided, or not.

Bono had quipped from that they would "go away to dream it all up again" from a Point, Dublin stage on the second last night of the 1980s. He was as good as his word. U2 returned with arguably their most critically acclaimed album, Achtung Baby, and the bitterly cold winter they spent in a studio near the collapsing Berlin Wall would play its part on songs that were dark, hopeful, playful and, well, sexy. As a career reinvention, it was pretty special - and it's hardly a surprise that U2 have subsequently regarded Berlin with great fondness.

They're not the only artists who have decamped to Berlin in search of inspiration. David Bowie made the same pilgrimage towards the end of the 1970s and emerged with Low and "Heroes" - fan-favourites that are far removed from his Ziggy Stardust and Aladdin Sane personas of earlier that decade. The latter's distinctive cover image was inspired by an expressionist painting Bowie had seen in a left-field art gallery the city, but Berlin was all over the album sonically too - particularly in its experimental, largely instrumental second half.

In an astonishingly fertile period of creativity, he also found time to produce two brilliant albums, The Idiot and Lust For Life, for his mate - and Berlin flatmate - Iggy Pop. Having been addled by the effects of cocaine in Los Angeles during the middle years of the '70s, Bowie went to one of the most decadent cities in Europe to get clean.

All those albums - and Achtung Baby too - were largely recorded in Hansa Studios, a fine old building in crumbling West Berlin that had been used as a Nazi ballroom during World War II. History reverberates in this great space as I discovered in 2015 when I went on a guided tour in advance of U2's four-night stand at the city's spanking new Mercedes-Benz Arena.

Thilo Schmied, the founder of Berlin Music Tours, had obsessive detail about the recording of all those storied albums and he spoke with real passion about the old ballroom where U2 had first given life to One and the side room from which Bowie had spied "Heroes" co-producer Tony Visconti meeting a lover next to the Berlin Wall. Visconti was married at the time and the clandestine image burned itself into Bowie's imagination and the rousing title track of "Heroes" was born.

I remember Thilo - a child of the former East Berlin - pointing out this very window to where the Berlin Wall had stood, but it was impossible to imagine it such was the rate of change over the preceding quarter-century. The streets surrounding Hansa were like that of any modern capital, but it had all been so different when Bowie - and Depeche Mode in the 1980s - had first ventured here. Photos from the time show a building seemingly marooned in no-man's land.

Now, there are occasional street markings to denote where the wall had stood for twenty-eight years, but often it's very difficult to tell whether you're in the old West or East.

For much of the twentieth century, Berlin was synonymous with edgy art and culture. The artists of the Weimar Republic were a daring lot who took visual art into a bold new place. Germany led the world in architecture and its Bauhaus movement would leave a lasting impression on the built environment of the city - and much further afield.

It was also a capital famed for its cabaret clubs and the risqué, sexually open and gay-friendly culture here in the 1920s and '30s would mark the city out as Europe's most permissive.

The era is captured in vivid detail by the English author Christopher Isherwood, who lived in the city in the 1930s around the time the Nazis were coming to power. His classic book, Goodbye To Berlin, would spawn a hugely successful musical, Cabaret, and a film of the same name. For many, Liza Minnelli's Sally Bowles embodied everything that was thrilling and erotic about pre-war Berlin.

The art-hating Nazis - ironic considering Adolf Hitler had been an art student - did all they could to suppress subversive painting, theatre and music. Their systemic vandalism would be felt for decades.

But Germany - and Berlin - began to reassert itself as a cultural force towards the end of the 1960s thanks to a golden wave of young directors. Werner Herzog, Rainer Werner Fassbinder and Wim Wenders helped change the course of art-house cinema thanks to films that captured life in West Germany and hinted at the complex relations with the Communist East.

One of Wenders' key films, the romantic fantasy, Wings Of Desire, would prove to be influential to U2 when making Achtung Baby and they recruited the director to shoot the video for Stay (Faraway So Close), the standout track on follow-up album Zooropa.

German music had its moment in the 1970s. Kraftwerk - from industrial Cologne - did more than anyone to invent electronic music and it can be argued that their influence on the charts today is every bit as significant as The Beatles.

And they weren't alone. Bands such as Can, Cluster, Neu! and Tangerine Dream were at the cerebral end of music in the 1970s and influenced a legion of contemporaries like David Bowie and Brian Eno. The London music press glibly dubbed the scene 'Krautrock', but this was music that broke down boundaries and expanded horizons.

It's difficult to argue that Germany and its capital have had quite as much of an influence on the cultural zeitgeist since the Berlin Wall tumbled as they had before, but there have been some wonderful exceptions. Good Bye, Lenin! from 2003 explored the curious phenomenon of Ostalgie - former East Germans being nostalgic for the foods, customs and way of life of the old Communist regime - while a much more sobering film, The Lives Of Others, offered a chilling portrait of surveillance society in the Stasi-controlled East.

More recently, German TV drama has been in the ascendant. Deutschland 83 was a hit on Channel 4 last year and a new season will arrive by year end, and there's considerable excitement surrounding a new German-language series, Dark, which is soon to air on Netflix. And yet, serious aficionados of German drama will tell you that nothing will beat the scope or ambition of the 1980s and 1990s series, Heimat.

Today, the cost of living may not be quite as affordable as it was even a decade ago, but Berlin remains one of the least expensive capitals in Europe, especially when it comes to rent. It's still a magnet for Europe's bright young things and those hoping to make their mark on the arts.

A new generation of Irish artists and musicians have, at one stage or another, called Berlin home including Mick Flannery, Wallis Bird and Mano Le Tough.

The Irish population in Germany is up fifty percent in a decade and Dublin entrepreneur and literature lover Orla Baumgarten is typical of the new breed making their mark in Berlin: she opened her bookshop, Curious Fox, in the once tough, now hip Neuköln four years ago, and it's much admired.

Seasoned David Bowie admirers will be familiar with the district. It was the title of one of "Heroes" startling instrumentals. Like so many short-term immigrants - whose number includes U2 - Bowie took from the city, but he gave back too. Deutschland über alles, indeed.