The São Paulo police are not known for their softly-softly approach when it comes to mass evictions. They go in hard. Rubber bullets. Teargas. Percussion grenades. Pepper spray.

This is what about 1,000 people who have been squatting in an abandoned hotel in the city centre for a decade are facing on 22 October, barring a last-minute reprieve. But they are not afraid, they say, nor do they intend to budge.

“We have already been teargassed, and we have been hit by batons,” said Ivaneti Araújo, 43, one of the organisers of the group. “It has happened to us at other occupations.”

The city government was trying to negotiate buying the building from its owners when a judge issued the eviction order. Now anger is growing over what the campaigners argue will be an unjust expulsion of a model occupation in a region that has long been afflicted by homelessness, drug abuse and poverty, but which is now being busily gentrified.

The British Catholic charity Cafod and a Brazilian charity, Apoio, have set up a petition to overturn the eviction order and gain permission to turn the building into social housing, which is allowed for under Brazilian law. There are an estimated 15,000 people living on the streets of São Paulo, a city with more than 200,000 vacant buildings, Cafod says. Their numbers have been swollen by a two-year recession that has taken unemployment to 14%. So why add more?

“It would be a great injustice if this eviction goes ahead,” said Emily Mulville, Cafod’s programme officer for Brazil. “In this country, the lack of decent housing and basic services for a large section of the population is the most visible expression of poverty and inequality.”

In the central Luz neighbourhood, the former Hotel Santos Dumont on Mauá Street had been derelict for 17 years before Araújo and other homeless activists moved in and renovated the building in 2007. Calling themselves the Mauá occupation, they removed truckloads of garbage and rubble, transforming a filthy shell filled with pigeon excrement, dust and fleas into a functioning community of 237 families, most in low-paid jobs.

“We cleaned it, we washed it, we did joint cleaning efforts,” said Araújo. “It was totally abandoned.”

Like many in the Mauá occupation, she came to São Paulo to find work. She lived in a cortiço – a Brazilian slum tenement of tiny rooms where 30 to 40 families share the same bathroom – before ending up on the street with two of her five children. Then she found one of the many activist groups of homeless people occupying empty buildings across São Paulo.

These “occupations” provide homes for poorer Brazilians who work in the centre but cannot afford the rents, and are otherwise forced to live on the streets, in favelas or in cheaper areas deep in the suburbs that it can take two hours to reach by public transport.

Residents Juliana Antonachi, husband Diego Paula Silva and their four daughters, stand in their apartment at the Mauá building Photograph: Andre Penner/AP

“The housing movement impacted positively on each family,” she said.

Araújo’s story is typical of many of the occupation’s residents, whose lives form a patchwork of poverty. Crammed into tiny but immaculately kept rooms, with just two bathrooms per corridor, they still pointed out that the occupation gave them a safe home in a ruthless, forbidding and overcrowded metropolis. Their harsh economic reality is shared by tens of millions of Brazilians in this deeply unequal country, where six super-rich Brazilians are worth as much as 100 million of their poorest compatriots, according to a new study by Oxfam.

Residents in the Mauá occupation pay about £28 a month to cover maintenance costs and they share cleaning duties. Rules are strict: fighting, drug use and alcohol abuse lead to expulsion. There are regular residents’ meetings and a small shop.

“It is a real community here,” said Luzia Ramos, 43, who shares two rooms with her three grandsons – her daughter, the boys’ mother, has a mental illness and is in hospital.

Ramos migrated from poverty in Bahia, in Brazil’s arid north-east, at 18 and worked as a cleaner before losing her job. She has lived in occupations like this one for 30 years and said she was not scared of the eviction. “It is very unjust to remove all these families,” she said.

During the 20th century, São Paulo’s historic centre was home to the city’s rich, who lived in ornate apartment buildings, but after a series of floods, banks and richer Paulistas moved out to higher ground. The Hotel Santos Dumont was built in 1965 to house travellers using the nearby bus station. But by 1982 the bus station had been relocated and the city centre had begun to fall into decline.

Apart from its railway station serving low-income outer suburbs, a metro interchange and an art museum, the Luz area achieved notoriety as the location of Cracolândia, an open-air slum dubbed the crack capital of Brazil, where users deal and consume openly.

Even so, over the past decade galleries, bars and clubs have opened in the city centre, followed by smart new condominiums. Under Brazilian law, if people live in a disused building for five years without legal intervention, they can take it over. Yet days before that deadline was reached at the former Hotel Santos Dumont, its owners, Mendel Zyngier, Sara Zyngier and Abram Sznifer, moved to evict the occupation. In 2013, the city offered £2.8m to buy the building for the residents and create social housing. A 2014 valuation – carried out, residents say, without anybody entering the building – set a value of £5m and that has now climbed to £6.1m.

The city has upped its offer but eviction could take place before the negotiations are concluded. According to a spokeswoman, the city has plans to deliver 25,000 homes to the poor by 2020, a small dent in a housing deficit of 830,000; but if it pays the owners of Hotel Santos Dumont what they want, it will have to turn down other families.

“If the owners cede a little and do not want to demand an absurd value, we can make this viable,” she said. Contacted via their lawyer, Williamberg de Souza, the owners did not reply to the Observer’s questions.

The Mauá community has seen off other eviction threats, but this time the danger is real. Roberto de Mello, 50, said he will start packing up the books in Russian, French and English that he studies in his spare time. He built a bathroom over a disused lift shaft at the back of his room and works as a doorman in a condominium, but his monthly salary of £305 would barely cover the cost of living in a tenement.

Paulo Figueiredo, 32, sells cellphone chargers, USB drives and memory cards on the street and is unsure what he will do if the community is evicted. “No idea. The street?” he said. “If I leave here, I can’t pay rent.”

Like many living here, both men are evangelical Christians – a growing group, especially among the poor. Services are occasionally held in a communal meeting room. Florentino de Brito, 48, converted last year and spends his time since he lost his job as a driver’s assistant watching evangelical TV programmes in the bedroom he and his wife, Solange dos Santos, 46, share with their son, Juan, 15, who sleeps on the other side of a wardrobe.

Solange works as a cleaner and Florentino starts a new job this month, but their combined income will not cover central São Paulo rents. “We just don’t want to leave here. We don’t have anywhere to go,” he said. “This place is a blessing.”