A right-wing French mayor has lost a legal battle to clear his name after failing to delete racist Facebook posts by his supporters during an election campaign. Julien Sanchez, 37, was fined 4,000 euros ($4,742) by a French court in 2013 over anti-Muslim posts complaining of drug trafficking, shisha bars and mosques in the city of Nimes, where he was running as an election candidate. Mr Sanchez, a member of Marine Le Pen’s right-wing National Rally party, complained that he did not see the posts during the 2011 campaign. The fine was later reduced by a quarter on appeal. He took his fight to the European Court of Human Rights, claiming that his conviction breached his right to freedom of expression. He lost his case on Thursday after six of seven judges ruled against him. The court found that he had failed to remove the comments for weeks after he was told about them. “I will consult my lawyer and if there is a way to appeal this judgment of the court, I will appeal,” the mayor of the ancient town of Beaucaire told French media. He was elected mayor of the town in 2014, and economic problems have highlighted tensions between its white residents and those with origins in France’s former colonies of North Africa. Mr Sanchez campaigned on a promise to tackle drug dealers on street corners and bring tourists back to the town, arguing that too many kebab shops had obscured its roots. The Eurosceptic politician is no stranger to controversy having been behind a plan to re-name a street in the town “Rue de Brexit”, in honour of the UK’s decision to leave the European Union. He also previously tried to stop the late opening of shops during the first days of Ramadan, citing the “nuisance” they caused. A court ruled the move illegal. France's far right suffered a setback in regional elections in June in what was seen as a test of the national mood before the 2022 presidential race, when Ms Le Pen is expected to challenge President Emmanuel Macron.