Berlin's state interior minister, Ehrhart Koerting, said several officers sustained light injuries when fire extinguishers were sprayed at them during the operation against squatters and their supporters elsewhere in the city.
The house in the former East Berlin was occupied as Germany was reunited in 1990. Residents were given rental contracts at one stage but those were later terminated when private investors bought the building.
Koerting said nine people inside the house were detained. The operation was complicated by damage inside, including a partially removed staircase.
Later Wednesday, groups of protesters broke the windows of buildings around one of Berlin's railway stations, police said. There were arrests, but it wasn't immediately clear how many.