The goal? To prevent the vacant flat from being taken over by organised gangs who break into empty homes, hand them over to others for a fee who then proceed to hold the owners to ransom -- a phenomenon that has homeowners and authorities concerned.
They "look for empty flats online or in public registries to break in," says Enrique Vendrell, president of Barcelona's College of Property Managers, which groups professionals in the sector.
They then change the locks, hook up the property illegally to electricity, gas and water before selling the keys to squatters keen to make some cash who will demand money from the owners to leave, he adds.
It is difficult to get exact figures on the extent of a relatively-new phenomenon, but the trend is serious enough to worry real estate professionals, home owners and authorities.
Police in the northeastern region of Catalonia where Barcelona is located told AFP they were investigating serious cases of "criminal occupations" of flats, but refused to give further details, such as where the gangs come from.
Meanwhile AFP contacted several victims but they all declined to tell their story for fear of retaliation from the squatters, who often threaten homeowners if confronted.
"Ring the doorbell again and you will regret it," squatters told an elderly woman when she confronted a group of people who were illegally occupying her apartment, her lawyer Jose Maria Aguila said.
READ ALSO: More news from Barcelona
Juan Carlos Parra, a salesman with security firm STM Seguridad which specialises in installing steel doors in buildings, says there is strong demand for "advanced security systems."
"Demand has taken off in the last three years, we install around 1,500 doors a month across Spain," he adds.
The problem stems in part from the collapse of a decade-long property bubble in 2008 that left thousands of buildings empty across Spain.
There are 3.4 million empty properties in Spain, the equivalent of 13.7 percent of all real estate in the country, the national statistics institute says.
Many are in the hands of banks which inherited them after builders or buyers were unable to pay back their loans.
Just in Catalonia alone, banks own 45,000 empty apartments, according to the regional government's housing department.
These are the most sought after since lenders usually take longer to act against an occupation.
Such is the problem of squatting in vacant flats that it has given rise to a firm called Desokupa that specialises in evicting squatters.
The company based in Catalonia and Madrid insists its employees carry out "respectful mediation" between the property owners and the squatters.
If that fails though, it employs burly former boxers and security guards to stand guard outside an occupied apartment to drive away the squatters.
But Vendrell says there is a difference between squatters looking for a place to live because they have fallen on hard times or who remain in their flat as they can't pay rent, and gangs who take over properties.
He says these organised groups charge less than 1,000 euros ($1,100) per apartment seized.
Those who take over the flats then typically demand between 3,000 and 6,000 euros to leave.
And in some cases, owners prefer to pay to save time.
Antoni Garriga, a lawyer with Navarro Advocats who often deals with eviction cases, says it can take six to eight months for an eviction notice to be issued.
The process can take even longer if the illegal occupants manage to evade court notifications to leave the apartment, he adds.
Barcelona mayor Ada Colau, a former anti-eviction activist, argues reducing the number of empty apartments would go a long way to solving the problem.
"We need more empty homes to be offered as social rental housing," she said in a recent interview with Antena 3 television.