Police have fired water cannon at about 400 anti-capitalist protesters blocking roads in a town near the venue of the G7 summit in south-west France.

A few protesters threw rocks at police, but the crowd in Bayonne was largely peaceful, with some activists dancing.

France G7 Summit
A protester throws a rock at police in Bayonne (Emilio Morenatti/AP)

Police responded with warning shots and then water cannon.

The incident took place near a bridge barricaded by police as part of extensive security measures around the G7 summit meeting in Biarritz that opens Saturday.

Earlier in the day thousands of demonstrators marched peacefully from the area to the Spanish border to demand more action against climate change and economic inequality.