French police have conducted a major security operation in the southeastern city of Grenoble after two videos appeared to show heavily armed men wearing balaclavas guarding a drug-selling spot.

The Mistral neighbourhood, where the videos were filmed and the raids took place on late Wednesday, is known to be heavily affected by drugs.

"The state will act against the savage behaviour of a minority in society," Interior Minister Gerald Darmanin said announcing the operation on Twitter.

Forty police officers conducted 50 identity checks, but there were no arrests.

The first video shows seven men wearing balaclavas -- some armed with what appear to be large guns -- keeping a lookout around a selling point set up with a table, towards which a client seems to be approaching.

The second video is set against a backdrop of rap music and shows five men posing, wearing sunglasses and sat around a table heavy with brightly coloured wrapped sweets that could contain drugs.

Both went viral on social media.

"It is probable that these images aimed at impressing potential enemies or rival gangs that want to take over this drug-dealing spot, in the war of territories and power," Grenoble prosecutor Eric Vaillant told Le Dauphine Libere newspaper.

Youths from the area have said the arms seen in the videos are replicas and were displayed for the filming of a rap music video.

Grenoble's Green mayor Eric Piolle criticised the operation as a government publicity stunt to show it was tough on crime.

"Entering into a war mindset and provocation with the drug-dealers is unhealthy," Piolle said, adding he believes that the traffickers were engaging in a marketing operation.

Several acts of violence in apparent score settling have shaken Grenoble this month.

A 29-year-old man was shot dead in the street on August 2 and two days later an ambush left one dead and one wounded by bullets.