Called by Basque separatist groups and leftwing parties, the demonstration went ahead despite a Supreme Court ruling earlier this month reducing their sentences of between two and 13 years to 18 months and nine-and-a-half years.
The two policemen were off duty and had gone to a bar with their girlfriends when they were set upon by locals in a fight.
One of the officers ended up in hospital with a broken ankle.
The incident took place in Alsasua, in Navarra, a northern region of Spain that separatists in the neighbouring Basque Country — including armed group ETA — have long laid claim to.
At the original trial, prosecutors had charged the eight defendants, aged between 21 and 31, with “inflicting injuries of a terrorist-nature” and issuing “terrorist threats”.
The plaintiffs had complained of an atmosphere of constant harassment of the police in the area.
But the court threw out those charges, convicting them instead of “attacking agents of authority”, causing injuries, as well as public disorder and/or threat.
The protest took place in front of the Navarra court building in Pamplona, the main city in the region, where the original trial took place. The Pamplona regional authority put the turnout at 7,500 people.