Thousands of anti-globalisation protesters marched in the French city of Nice on Tuesday, as police sealed off the nearby resort of Cannes, where the G20 summit starts on Thursday.

Protesters in Nice chanted slogans against corporate greed and in support of a counter-G20 summit, "People First, Not Finance", led by trade unions and NGOs including Greenpeace and Oxfam.

Police said 5,500 people turned out; organisers counted 12,000. Riot police and helicopters confined the demonstrators to a working-class neighbourhood to the east of the city, which will provide a base for the alternative summit and anti-G20 protests over the next four days.

The demonstrators are to be kept in Nice, 30km up the coast from "fortress Cannes", which was chosen as a summit venue because of the ease with which it can be sealed off. More than 12,000 police have been deployed on the Côte d'Azur to provide security for the G20 representatives meeting on the Croisette, in an operation that has seen most of Cannes's manholes soldered shut.

France obtained special authorisation from Brussels to set up controls across the border with Italy.

Three Spanish nationals were arrested on Tuesday morning on the Nice seafront. The French interior ministry said they were carrying bolts, mountaineering axes, balaclavas and gas masks, and wearing T-shirts and badges that suggested they might be part of the Black Bloc movement which calls for violence against symbols of capitalism.

At the peaceful Nice demonstration, many complained they were being kept away from Cannes. "I find it abhorrent that we're stuck in Nice and that police have pushed us into a working-class neighbourhood far from the centre and chic Nice," said Magalie Reymond, a social worker from Grenoble.

Javier, a student from the Spanish los indignados sit-in in Pamplona, said: "My car was stopped and searched at the border, and police forced us to take a convoluted route to get here."

The counter-summit will last four days, until the end of the G20, and will also stage a protest action at the Monaco border against tax havens. There was a large presence of indignados from Spain, and some protesters from Greece and Italy. Along the route of the demonstration, some advertising billboards were whitewashed by demonstrators.

"I'm here to take a stand against the whole G20, which will be making decisions the people have no say in," said Beatrice Jollivet, a care assistant and member of the French anti-capitalist NPA party, who had travelled 150km by coach to protest. "We're here to say to them, it's your debt, it's your problem. The people shouldn't pay the price through austerity measures, unemployment or the destruction of public services."

France is keen to avoid a repeat of the violence at the 2000 European Union summit in Nice, when 50,000 anti-capitalism protesters fought running battles with riot police.