Surfers must stay out of the Atlantic waves, tourists will have to keep away from gleaming beaches at the height of the summer season and locals risk being unable to access the city centre.

A raft of unprecedented measures are set to transform the glamorous French resort of Biarritz into a security fortress as it gears up to host G7 leaders this weekend.

Usually in late August, the picturesque Grande Plage beach would be packed with swimmers, tourists and above all hordes of surfers.

But for the August 24-26 summit, sun and wave worshippers will have to look elsewhere as the entire central area will be shut down to host the likes of Donald Trump, Boris Johnson and Angela Merkel.

Activists have announced a "counter-summit" of thousands of people to lambast the policies of world powers, and the French authorities want to avoid violence at all costs.

After months of anti-government "yellow vest" protests in France, which sparked criticism of heavy-handed policing, President and host Emmanuel Macron warned in May that security measures in Biarritz would be "unprecedented".

With 13,200 police and gendarmes deployed across the area, access to the Grande Plage will be forbidden while the luxury Hotel du Palais overlooking its sands hosts the talks between world leaders.

Throughout the summit, trains will not serve the stations in Biarritz or the neighbouring resort towns of the region, and its airport will be closed to scheduled flights.

Just days before the event, five people including "black bloc" anti-capitalists were arrested for posting messages online encouraging attacks on a hotel accommodating police during the G7 talks.

'Can't cross the road'

Authorities have banned all demonstrations, not just in Biarritz but also the conjoined towns of Anglet and Bayonne.

Residents, for whom the influx of tourists in August is a major source of income, are in two minds about the benefits.

"We are in the dark, we don't really know what it will bring," said Marie Moreau, who works at a cafe in central Biarritz.

Two security perimeters will be set up with a "red zone" including the beach and the Hotel du Palais off limits to anyone without summit accreditation.

Outside that area, much of the rest of the city centre will be in a blue zone where locals and businesses will need a badge obtained from the town hall to gain access.

"I live in the blue zone, but the other side of my road, where the town hall is located, is in the red zone," said local Jacques Larre. "I won't be able to cross the road."

But he added: "I think it's a good thing for Biarritz to promote the history of the resort."

'Act with determination'

The Hotel du Palais, built for Napoleon III's Empress Eugenie, whose enthusiasm for Biarritz turned it into a major resort, has undergone a 60-million-euro ($67-million) facelift ahead of hosting the world leaders.

But those wanting to protest won't be allowed anywhere near the sumptuous building, and will instead have to meet well outside Biarritz.

Their actions are a far greater headache for the authorities than any risk from Basque separatist militants, whose activity was always less intense in France than in neighbouring Spain, where the violence has also waned since a 2011 ceasefire.

The counter-summit, with 5,000-10,000 participants expected, will be based in the town of Urrunge and is co-organised by activist groups including G7 Ez which means "No to the G7" in the Basque language.

Protesters plan to march from Hendaye, the southwestern most town in France, to Irun in Spain on Saturday and then hold sit-ins on the second day of the summit.

"We are going to act with determination. We will not damage anything and we are not going to take part in one-upmanship," said Aurelie Trouve of the Alternatives G7 activist group.

"The aim is to have maximum security with a minimum of disruption. We will not tolerate any unrest. If it happens, we will respond," Interior Minister Christophe Castaner said in Biarritz on Tuesday.