Migrants and squatters set up burning barricades at an abandoned school outside Rome after police were ordered to clear the site.
Residents set fire to tyres, mattresses and rubbish to try to 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 neighbouring Turkey.
Prime Minister Kyriakos Mitsotakis met Mr 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.
Mr Mitsotakis’s 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.