Residents set fire to tires, mattresses, and garbage to try and deter the police in riot gear. But authorities doused the blaze and proceeded with the eviction.
Police used mobile video cameras in the operation along with a negotiator who used a loudspeaker to tell the building occupants: "Those who have nothing to do with this, families, come down. You can come down, come. Nothing will happen."
Italian Interior Minister Matteo Salvini, who has championed a crackdown on migrants, said Italy had "no tolerance" for anyone who illegally occupies abandoned buildings. He said the structure was dangerous and put women and children living there at risk.
City hall officials said they were providing alternative housing for the nearly 200 people affected.
Rome has a long history of squatters, with Italians and migrants alike lamenting a lack of affordable housing.
The number of migrants crossing the central Mediterranean to Europe has fallen sharply over the past year, according to the European Union's border protection agency Frontex, with an increase reported in June in the East Mediterranean route between Turkey and Greece.
Dimitris Avramopoulos, the EU commissioner for migration and home affairs, was in Athens to meet officials from Greece's new conservative government, which has promised to speed up the asylum process for migrants and refugees and restart deportations to neighboring Turkey.
Prime Minister Kyriakos Mitsotakis met Avramopoulos and government officials later said that discussions focused on rapidly reducing a backlog of asylum applications and a return to the terms of a 2016 EU-Turkey agreement that allow for the deportation of migrants whose applications have been rejected.
Mitsotakis' conservatives won a general election this month on a pledge to cut taxes and take a tougher line on migration. Greece and NATO-ally Turkey are currently at odds over a drilling rights dispute around the war-divided island of Cyprus.
Derek Gatopoulos reported from Athens, Greece.
Follow https://twitter.com/nwinfield and Gatopoulos at https://twitter.com/dgatopoulos
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.