The controversial burkini ban is the product of political opportunism rather than secular idealism or strategic craftiness.

The more an election approaches, the more short-sighted politics gets - the burkini bans that were introduced across multiple southern French municipalities are a sad piece of evidence for that.

As the 2017 presidential and legislative elections are looming over France, the country's politicians have seven months left to win the public's support. So they are stressing out.

No French politician truly believes in the practical value of the burkini ban for preventing terrorist attacks. Politically, it might be the most convenient solution, but strategically, it is suicide - everyone knows that.

The French mayors who passed the laws are neither blind nor stupid; they are simply playing their game, at any cost. While it is likely that some of the mayors have personal stakes in the 2017 elections or plan to run for MP seats, others may have just jumped on the bandwagon out of political convenience.

But as France's mainstream politicians struggle to respond to the rising public support for the far-right Front National and to enhance their appeal to a vanishing middle ground, their best chance to gain votes is to appear firm and uncompromising and focus on what a vast proportion of the public wants: identity politics.

If the goal of the Nice attack perpetrator Mohamed Lahouaiej-Bouhlel was to add fuel to the fire and escalate community tensions, he chose the right spot. The French Riviera, a traditional stronghold of the French Republicans, has recently seen the highest poll results for the far right.

Last year, Front National leader Marine Le Pen's niece, Marion Maréchal-Le Pen, waged an extensive campaign and gained massive support in the regional elections. It is now rapidly turning into a radicalisation hotbed for both far-right and Islamist extremists.

The burkini might be a sad symbol of Islam going backwards in terms of gender issues, but the burkini ban is a sad sign of liberalism going backwards in France.

Although it is hard to believe, the burkini ban has received considerable support on the other side of the Channel. Even a brief comparison of the public's reactions on southern French and British Twitter accounts reveals a significant perceptional gap in regards to the policy. While in the UK some users have equated the latest police incident of armed French policemen forcing a fully covered woman to remove her clothes on a beach in Nice with sexual abuse, a shockingly high number of French accounts express strong support for the policy and even defend the security forces involved in the incident.

The million-dollar question is: will it ever be possible to close the gap between the politically convenient decision and the strategically right decision?

The only effective remedy against politicians' short-sighted policies is an informed public that understands both the nature and the extent of the threat.