Brazilian military police have evicted hundreds of families from an abandoned factory in Rio de Janeiro that has been their home for several months.

Around 2,000 people have been living in the former plastics factory in a run-down part of the city. The community was nicknamed Favela Nova Tuffy, after the factory's owner, Arab businessman Tuffy Habib.

Favela Nova Tuffy
Makeshift homes, part of the Nova Tuffy slum, are pictured in the abandoned factory on 17 October, 2014Pilar Olivares/Reuters
Favela Nova Tuffy
Brazilian police special unit members enter the abandoned factory to evict residentsYasuyoshi Chiba/AFP
Favela Nova Tuffy
A police officer loads a television into a truck as the Nova Tuffy slum is evacuatedPilar Olivares/Reuters
Favela Nova Tuffy
A police officer loads a tricycle into a truckPilar Olivares/Reuters
Favela Nova Tuffy
People carry their belongings as they are evicted from the abandoned factoryYasuyoshi Chiba/AFP
Favela Nova Tuffy
A man prepares to gather up his belongings as he is evictedYasuyoshi Chiba/AFP
Favela Nova Tuffy
Eliana Santana, 63, cries inside her home as she realises she won't be able to remove all of her belongings before she is evictedYasuyoshi Chiba/AFP

The factory, which had been closed for a decade, was occupied in March and became filled with makeshift shacks made of planks of wood and plastic tarpaulins.

Plumbing was rusty, electricity came from illegal connections and there was no sewage system. Rats and cockroaches swarmed the makeshift dwellings, and illnesses caused by water-borne bacteria were common.

Favela Nova Tuffy
36-year-old Simone Goncalves holds her eight-year-old daughter Linda Vitoria, during their evictionYasuyoshi Chiba/AFP
Favela Nova Tuffy
Brother and sister Lucas and Lorena pose for a photo in their makeshift home on 17 October, 2014Pilar Olivares/Reuters
Favela Nova Tuffy
A babysitter stands at the entrance of a makeshift home on 17 October, 2014Pilar Olivares/Reuters
Favela Nova Tuffy
A woman watches television inside her home in the abandoned factory on 17 October, 2014Pilar Olivares/Reuters
Favela Nova Tuffy
Children play in a swimming pool among makeshift homes in the Nova Tuffy slum on 17 October, 2014Pilar Olivares/Reuters

But the people who lived there said they couldn't afford commercial rents and had nowhere else to go.

Vera Lúcia Pereira, 58, who had lived at the site since June, told the Brazilian newspaper G1: "I had to choose between eating and paying rent. So, I came here."

Favela Nova Tuffy
A woman reacts as she is evicted from the Nova Tuffy slumFabio Teixeira/Reuters
Favela Nova Tuffy
Furniture is left in a makeshift room in the former factoryYasuyoshi Chiba/AFP

Authorities say residents will be transported to a shelter and registered for social housing programmes.