A mile east of the Luís I Bridge in the middle of a residential neighbourhood in Porto, Portugal’s second city, sits a bleak and decaying building.

Initially a three-storey car park, then a thriving shopping centre, the building has more recently suffered from years of neglect. Its walls are sprayed with graffiti and plastered with stickers, and the windows are blacked out.

But listen closely and you can hear the windows rattle to the sound of drums and electric guitars from dozens of rock, funk, blues and jazz bands.

You get louder, then your neighbour gets louder – it was like a war. Who plays louder!

Nuno Mendes

Diogo Azevedo, singer of the thrash metal band Jarda, is one of an estimated 300 musicians and artists who helped turn Centro Comercial Stop – known as Stop – into a unique, and controversial, music studio complex.

“It’s part of the underground scene in Porto,” Azevedo says, attractive to its bohemian occupants, but a headache for city hall.

‘It ends up being a waste if this place was demolished to be one of many other hotels in Porto’ … The Centro Comercial Stop music studio complex on Rua do Heroísmo.

Porto’s authorities claim the building is illegal: it was never intended to be a music studio, they say, and it fails to comply with modern safety requirements.

The musicians feel differently. For the past 10 years they have battled to keep the building open, citing its cultural relevancy at a time when locals feel they’ve been priced out of the city by the ever-increasing demand from tourism.

“We have so many friends here,” Azevedo says. “We rehearse, jam. It ends up being a waste if this place was demolished to be one of many other hotels in Porto.”

The car park first became a mall in 1982, one of dozens that sprouted like mushrooms across the city following the collapse of the Second Republic. Locals flocked to the cinema and top-floor dance hall. But new, larger, out-of-town complexes in the 1990s saw many of Porto’s businesses, customers and residents relocate to the suburbs. Shutters were pulled down over large areas of the city.

A drummer takes part in a rehearsal for Batucada Radical at Stop.

‘We came here because nobody wanted us in other places’ … A drummer takes part in a rehearsal for Batucada Radical at Stop.

Helena Fernandes remembers her first visit to the abandoned mall. “It broke my heart,” she says. “I saw how shopping was in the golden days and this was empty.”

Hernandes, 44, is president of Batucada Radical, a Brazilian street percussion band. “We came here because nobody wanted us in other places,” she says. “We are very loud. We stayed for six months rehearsing in one place, and people asked us to get out. We were like nomads.”

In Stop they saw an opportunity. They negotiated cheap rates and, along with other musicians, transformed the storefronts in amateur rehearsal and recording studios.

“Bands came here to rehearse because it was very cheap,” says Nuno Mendes, 45, a musician and producer based on the building’s second floor. “No one wanted to come here, because it has these hallways [with] drug addicts; it started to be a bit underground. People came here because they could make some noise.

“It was crazy. There were lots of heavy metal bands that started – rock, punk. The building trembled. It’s weird because your neighbour is the one who blows out your ears. You get louder, then your neighbour gets louder – it was like a war. Who plays louder!”

A corridor inside Stop.

‘No one wanted to come here, because it has these hallways [with] drug addicts; it started to be a bit underground’ … A corridor inside Stop.

Many of the musical groups are collectives – Hernandes’ began with 20 members but now has more than 100. The venue, she says, has been “a turning point” for the group. “With rents as they are now, it would be impossible to get a place like this,” she says.

The artists’ appetite for loud music, late-night drinking and in some cases antisocial behaviour have somewhat strained relations with the local community.

“It was like a Noah’s Ark where all the animals were inside,” says Jorge Prendas, a coordinator at the music venue Casa da Música, which rented two studios in Stop. “Police went there three or four times to close it. They had a very good argument: it was not safe.”

But authorities couldn’t close it, because of a quirk: the building has never had an owner, so legal responsibility fell on the dozens of individual landlords of the various retail spaces. The sales of these shopfronts, however, were unregulated, and authorities in many cases don’t know the owners, let alone how to track them down.

A studio in Stop.

‘The [electrics were] very old and not reliable’ … A studio in Stop.

Without clear ownership or maintenance, the building slid into disrepair. The escalator and air conditioning clunked to a halt, toilets were badly damaged and water leaked from ceilings. To improve acoustics, musicians glued cardboard egg cartons and sponges to walls, but this only amplified the fire risk – in a building with no fire exits or sprinklers, at a time when unsafe electrical usage in the building was surging.

“The [electrics were] very old and not reliable,” Prendas says. “You had one plug and 20 instruments in that plug [and] lots and lots of adapters.”

By 2010, with rumours spreading that the then mayor’s patience was wearing thin, dozens of musicians formed the Pro-Stop Association and reached out to Prendas. “They didn’t have authorisation to do musical rehearsals there and they didn’t have the license for the building,” he says. “[Casa da Música] wanted to promote their image – to show that we are on the side of the musicians and artists.”

The group was called StopEstra (from “Stop” and “orchestra”), and for its launch it staged a 21-band performance across the city, performing nonstop for six hours before convening at Casa da Música the next night as a unified 100-piece rock band.

StopEstra live.

The British composer and director Tim Steiner, who conducted the group that evening, says the experience was “an extraordinary thing”.

“I’ve been working for 30 years in community-grounded music projects around the world and there’s nothing like StopEstra”says Steiner, a former professor at the London Guildhall School of Music. “There was a real understanding between all the musicians – a lot of respect – and a sense of experimentation and exploration of what you could do when you have a large group of rock musicians together.”

The megagroup performed seven more times over the next six years, including as the opening act for the first Porto edition of the Primavera Sound music festival in 2012, and had appeared to secure the building’s future.

A fire in 2017, however, gutted four studios and once again drew the attention of city hall. A new organisation, Alma Stop, fronted by the Portuguese singer Manel Cruz, was formed to defend the building’s case – but it was a hard sell after the fire.

Folk musicians Sofia Mestre, 29, and Rita Só, 31, in their Stop studio .

‘We know people live the other side of the street. We play folk music and don’t [make] much noise’ … Sofia Mestre, 29, and Rita Só, 31, in their Stop studio.

“The biggest problem is the musicians,” Cruz says. “It’s very difficult for them to believe the truth. People can die here, we have to understand that.”

To appease the council, the organisation agreed to a rule whereby landlords would question the “acoustic suitability” of their tenants. Sofia Mestre and Rita Só accepted a 10pm curfew on playing the drums. “We know people live the other side of the street,” they say. “We play folk music and don’t [make] much noise.”

Other musicians have moved on to more professional digs. João Brandão used to rehearse here as a teenager, but has gone on to establish Plataforma Campanhã, a €1.7m (£1.45m) production hub with music studios, production rooms and a training academy for studio engineers and production staff.

“It’s the same concept” as Stop, he says. “We wanted to get together and share ideas and work together but in a more professional space. We knew that people needed a good studio in Portugal – a professional studio with good-quality equipment, good acoustics.

“Stop is a great thing, but it’s more of a rehearsal space and DIY. What we did learn in Porto is [that] people get along and willing to cooperate – and that was proven by Stop.”

City hall is much more supportive of the new, slicker venture, leasing a room for its vinyl library – 35,000 LPs donated by two radio stations – with plans for community events and podcasts.

Armando Sousa, 35, creator and archivist at Plataforma Campanhã’s new vinyl library.

Armando Sousa, 35, creator and archivist at Plataforma Campanhã’s new vinyl library.

Guilherme Blanc, head of contemporary art and film at the Porto Municipality for Culture, hopes Stop could soon do the same, as part of the city’s multimillion-euro investment in culture.

“The space doesn’t follow the necessary rules for public use. It’s not a public building – it’s an illegal building,” he says. “But what we want is to save the building for its current use, and that’s our goal.

“[We are] committed at the highest level to do whatever we can to fix the situation and save it. Culture-wise, the answer is given: let’s keep Stop open. [But] nobody can be in a position to be personally responsible for any accident that happens there. Follow the law, or it will close.”

To Mendes, Stop is about what Porto means to its residents – particularly its poorer artists and musicians – at a time when the city is growing. “Tourism is good,” he says, “it gives money, great industry, businesses around it, but we must draw a line. The centre of Porto is not for the people of Porto any more. Stop is a privileged place.”

Follow Guardian Cities on Twitter, Facebook and Instagram to join the discussion, catch up on our best stories or sign up for our weekly newsletter