"In 1979, a strange thing happened in Manchester.

All over the city, the old sewerage system had chosen that moment to suddenly collapse. The streets were filled with a foul stench as, within the space of a week, pipes laid the century before had finally rotted away. There, right in the heart of the industrial north-west, was a metaphor of the decay and despair that marked the final collapse of a 200-year industrial boom."

Paul Rambali, The Face, July 1983

The thing people tell you about Manchester in the 1970s and 1980s is how terrible it was. "Ugly," is broadcaster Terry Christian's description of the city he grew up in. "Scruffy and rundown," says former Happy Mondays freaky dancer and now wannabe politician, Bez. "A post-industrial wasteland," remembers former Hacienda DJ and writer Dave Haslam. The city of Joy Division and collapsing sewers.

How things have changed. Manchester - the city centre at the very least - has been transformed. In the late 1970s few travelled to the city centre at night. Now, people travel from all over the country. Manchester is less crumbling, more cosmopolitan.

So what was the catalyst of transformation? The official story is the Commonwealth Games in 2002. Staging the international sporting event kick-started a period of investment in infrastructure and regeneration that has helped transform not just the physical reality of the city but its very image.

And there is a lot of truth in that narrative. Manchester City Council can give you the facts and figures. But there is also a shadow story that can be traced back to the late 1970s. It can be found not on the running track or the football field, but in the record shops and music clubs of the city. And it started in the city's darker days.

"Manchester was pretty much of a post-industrial wasteland at the end of the 1970s, like so many cities in the world," Haslam recalls.

Although an incomer, the author of the book Manchester England was on hand to see the change. "Music repopulated a lot of the derelict spaces. Warehouses turned into clubs, rehearsal rooms. Youth culture generally doesn't really worry about how tidy a space is, it's just about how cheap it is. Music created an energy in the city."

You can trace it back to the ­establishment of Factory Records by the late Tony Wilson at the end of the 19702.

Newsreader, presenter of music programme So It Goes and subject of Michael Winterbottom's film 24 Hour Party People, Wilson's civic pride and ear for music helped the emergence of Joy Division and, after singer Ian Curtis's death, New Order. Their example fed a growing music scene in the following decade.

Manchester gave the world the Smiths near the start of the 1980s and the Stone Roses and the Happy Mondays near the end. At the same time, the Hacienda - for years seen as Wilson's folly - became the hippest nightclub in the world when its early adoption of acid house made it party central. Music projected Manchester out to the rest of the world.

"The first tourists were spotted in Market Street in 1989, wearing flares and asking for directions to the Hacienda," recalls Haslam. "And seriously, at that point we had one posh hotel where a rock star could stay. Music drew people into the city and it obviously grew in profile.

"It also had a psychological effect in that it created local pride and it gave the impression that Manchester was a happening city. And actually the city council didn't know how to redefine Manchester, didn't know what role a post-industrial city could play in the modern world. Music was the first instance where they kind of got an idea. Music was the trigger in Manchester."

Haslam says people involved in regeneration agencies told him by the end of the 1980s people were returning their calls because they'd heard of Manchester via the Hacienda.

Wilson was key, believes Terry Christian. "When he set up that music seminar In the City in Manchester people were like, 'who's going to come to Manchester?' But they flew in Seymour Stein, who managed Madonna, they had all the record companies up. And what the council noticed was that all the hotels were fully booked, all the bars were really busy, all the restaurants were really busy. and the amount of money that brought into Manchester.

"Tony put the idea in all their heads. I completely know so. He made them bid for the Olympics. He woke Manchester City Council up to the possibilities."

"What Tony understood was that Manchester was an international city," says Haslam. "It wasn't about our relationship to London. Our past had depended on our trade overseas. Manchester is a trading city and those international networks built the city and it was rediscovering that which made the difference in the 1980s and into the 1990s - that idea that people were interested in the city from outside.

"The ambition of the council of going for the Olympics was totally down to the kind of language people like Tony Wilson used. If you have people on that world stage saying Manchester is one of the great music capitals of the world and then you have people in sport saying Manchester United is one of the most famous football clubs in the world, then you're starting to talk in quite grandiose terms and you're not like Huddersfield or Reading."

It helped that the Manchester music scene's success coincided with the re-emergence of United under Sir Alex Ferguson as a sporting force, Haslam adds. "It was about what the next generation could do.

"That sense that the city had a future was … really key. I think people underestimate how a city can have a collective psychology and it can be turned around and people can feel good about their city."

"In terms of pop and club culture Manchester was totally ahead of the game," says Alex Poots, director of the Manchester International Festival. "Whether it was Tony and Factory and the Hacienda, or Canal Street with the very active positive gay scene."

But this was the work of private individuals, he adds. What was needed to take the city to the next level was for the council to buy in to this outward, internationalist vision. This it did, first through the failed Olympic bid and then with the Commonwealth Games success.

"I do remember nobody felt the Commonwealth Games was a kind of runners-up medal for us," says Haslam. "When the Commonwealth Games came along it didn't feel like the city had to step up to be a host city. We were already on a trajectory where it made perfect sense to have that kind of occasion here."

Part of the post-Games trajectory was the establishment of Poots's Festival in 2005. "Having done the Commonwealth Games they looked to culture and they thought other great cities like Edinburgh and Vienna and Paris have great international festivals and we don't. So it came from that," says Poots, who has been with the festival from the start.

The festival continues the idea of selling the city to the world. Bookings for Bjork's show in 2011 came from 54 countries.

More than that, though, he believes, the idea of culture as a driver has been absorbed by the council. "One of the unintended consequences of the Commonwealth Games … was they not only noticed they were able to do it but they got an appetite for it.

"And that actually got really deep into their DNA, to the point where when we were having all these cuts over the last few years they were so passionate about this thing that they didn't cut it. Not even 1%, because it was their baby and it's that kind of lovely organic aspect to regeneration that is really meaningful.

"Who else has built an art centre in the middle of a recession? There's a £17 million extension to the Whitworth Art Gallery which is opening in a few months. I think the civic leaders have started to realise that what makes a rounded city isn't just business and sport, it's also culture."

Poots grew up in Edinburgh and it was culture - in the shape of the now long-gone Mayfest - that drew him to Glasgow, in the same way it was the music scene that drew him to Manchester as a student.

Glasgow already speaks to the world through its music scene and a contemporary art scene that may be stronger and more internationalist than any other city in the UK, including London.

For Glasgow, the Commonwealth Games offer a chance to further enhance and embed the city's cultural reach and appetite.

"If one thing could come out of the Commonwealth Games in addition to an amazing celebration of sport and a great international city it is this belief that culture matters in Glasgow city," says Poots. "Obviously it does matter, but it could matter more, potentially. It's not about re-establishing Mayfest, it's about what's right for the 21st century in Glasgow."

Back in Manchester, the Hacienda was demolished and turned into apartments in the year of the Commonwealth Games in the city. Wilson died in 2007 and New Order are no longer talking to their bass player. But the city is still a cultural hub. The Manchester International Festival is one of the cultural events of the year. Culture is working for it. And the sewers work too.