Its facade covered in murals and anti-capitalist graffiti, the occupied building at 94 Rigaer Strasse is among the squats that mushroomed across the city after the fall of the Berlin Wall.
Numerous attempts have been made in recent years to clear the squat, but each time they have ended in violence.
Ahead of Thursday’s planned fire protection inspection, police had declared the zone a restricted area and banned all demonstrations in the environs.
But as officers arrived on the scene to secure the area, they were met with a hail of stones flung from roofs and the street.
Firecrackers were also hurled from windows and barricades set up by far-left activists were set on fire.
Police said officers were attacked by “around 200 people from the street and from the roof with stones”.
“Material was brought on the street and set on fire,” they added on Twitter.
As water cannons were brought in to put out the fires, officers partially withdrew from the scene.
But they later returned, backed by climbing experts, who were helping them get on the roof of the building to remove stones placed there by residents, added police.
Officials have planned a heavy deployment lasting into Thursday.
Berlin’s interior minister Andreas Geisel vowed a tough crackdown on the militants, saying there can be no special treatment or a “law for Rigaer Strasse”.
Rigaer 94 has been branded by Germany’s domestic security service as the centre of Berlin’s anarchist scene.
While some want to see the counter-culture bastion wiped off the capital’s map, others have defended it as a vestige of an old Berlin rapidly disappearing as property prices and rents rise sharply.