Hundreds of police backed by a helicopter on Monday raided dozens of apartments in central Barcelona used for selling and consuming heroin and other drugs, making dozens of arrests.
A court in the northeastern Spanish city authorised the search of 40 flats in the central Gotic and Raval neighbourhoods, according to a statement from the regional judiciary administration.
About 30 people were arrested, police tweeted, in the anti-drug trafficking operation which got underway at dawn.
Over 700 officers from Catalonia's regional police force, the Mossos d'Esquadra, and more than 150 officers from Barcelona's municipal police were involved, the two police forces said in separate tweets.
Several narrow streets in the centre of Barcelona were blocked by blue police vans as armed officers wearing ski masks stood guard, according to an AFP reporter at the scene.
Police removed cardboard boxes from several apartment buildings as neighbours looked on. Some tourists snapped pictures.
Residents of the two central neighbourhoods which are popular with tourists have long complained that empty flats, many of which are owned by banks and investment funds following Spain's property crash a decade ago, had been taken over by drug traffickers as places where people come to buy and use drugs.
They say the arrival of these so-called "narcopisos" has led to a rise in muggings of tourists as well as local shops by addicts seeking money to buy drugs, as well as violence between the different drug trafficking rings that operate in the area.
A video of a man wielding a large machete in broad daylight over another man as he lay defenceless and injured on the ground of a street in Raval made headlines in Spain last month.
Former French Prime Minister Manuel Valls, who was born in Barcelona, has made fighting crime in the city a central theme of his campaign to become the city's mayor in an election next year.