The calamitous error occurred when the magistrate at Creteil criminal court, outside Paris confused two dates in his calendar which led him to believe that the suspects had to be released back onto the streets because it would have been illegal to continue detaining them.
According to French daily Le Figaro the drug ring, known as 'Shitland', had established a "reign of terror" over an estate in Boullereaux, which has one of the highest rates for the trafficking of cannabis in the Paris area.
The gang, who had reportedly graffitied 'Bienvenue à Shitland!' (Welcome to Shitland) onto the walls of the estate, are accused of robbing residents' of their shopping on their way home from the market and demanding that neighbours pay them €10 to use the lift in their block of flats.
They are due to face trial in April and police believed it was necessary to keep them in custody until then.
"We aren't blaming magistrates but this blunder will have a big impact. The investigation teams have put everything into this case over the past two years," Emmanuel Roux, the head of the national French Police Union told Le Figaro.