André Marchand took out the official decree in his village of Briollay in the Maine-et-Loire department of western France at the beginning of July.
The move came after severe flooding in June prompted an invasion of mosquitoes in the village that stands on the river Sarthe.
Locals were complaining about being bitten constantly and mayor Marchand thought it was time to bite back.
But the target of the mayor's decree was not the mosquitoes, whom he knew would flout the ban given the issues he would have communicating it to them.
“I was being stopped and questioned by so many inhabitants of Briollay that a councillor told me to take out the decree against mosquitoes,” the mayor told France Info.
“It was just a humourous way of making the locals understand that I can't actually do anything. Most of them found it funny.
La municipalité prend un arrêté”Anti-moustiques” et France 3 s'en fait l'écho ! https://t.co/KJlpRRXpdQ
— Ville de Briollay (@briollay) July 22, 2018
“Now it's better, we have far fewer mosquitoes. Many are dead, but it's not the decree that has stopped them.”
The mayor has also taken more concrete measures against the mosquitoes including by installing three so-called “anti-mosquito traps” which attract the mosquitoes with pheromones then kill them with carbon dioxide.
Locals have also bought similar traps for their own gardens.
“We are not 100 percent happy and obviously need more traps but we can't put them around the whole commune,” said Marchand.
But the mayor knows that although he might have won he battle he can't win the war.
“We will be invaded by mosquitoes again the next time there are floods,” he said.
France has had a particular problem with mosquitoes this summer due to flooding caused by downpours in June followed by a hot July.