A court in Berlin has ruled that a police raid on a left-wing squat in the capital was illegal.

The raid on June 22 triggered a series of clashes between left-wing extremists and police.

In the most violent incident, 123 officers were injured during a riot in the Friedrichshain district that has undergone rapid gentrification in recent years.

According to German news agency dpa, Berlin's regional court ruled Wednesday that the owner of the building had failed to submit a bailiff's order that would have justified the raid.