Nicolas Sarkozy says he will impose a nationwide ban on burkinis if re-elected to the presidency in 2017, positioning himself as a strong defender of French values and tough on immigration.

Hundreds of supporters waving French flags chanted “Nicolas! Nicolas!” and applauded as Sarkozy, a conservative president from 2007 to 2012 before losing an election to Socialist François Hollande, promised to protect the French people in his first rally for the 2017 election.

“I will be the president that re-establishes the authority of the state,” Sarkozy told a crowd of more than 2,000 in a sports hall in Châteaurenard in Provence, a town where his Les Républicains beat the far-right Front National (FN) in regional elections last year.

“I want to be the president who guarantees the safety of France and of every French person,” the 61-year-old said.

The burkini ban: what it really means when we criminalise clothes

Read more

Taking a hard line on the burkini debate that has agitated France over recent weeks, Sarkozy said that the full-body swimwear should be banned from beaches across the country.

Several seaside towns have already outlawed the full-body swimwear, arguing that it breaks French laws on secularism, but there is no national ban. France’s highest court – the state council – is to rule in a case on Friday brought by the Human Rights League and an anti-Islamophobia group to reverse a decision by the southern town of Villeneuve-Loubet, near Nice, to ban burkinis.

“I refuse to let the burkini impose itself in French beaches and swimming pools … there must be a law to ban it throughout the republic’s territory,” he said to wide applause.

The row over the burkini bans on some beaches has divided the Socialist government, with the prime minister, Manuel Valls, clashing with his education minister.

Najat Vallaud-Belkacem, one of the Socialist government’s leading feminist voices, told Europe 1 radio the proliferation of burkini bans was not welcome and had “let loose” verbal racism. The Socialist party had previously expressed outrage after a 34-year-old French woman was stopped by police on a beach in Cannes for sitting with her children wearing a headscarf and long trousers and was shouted at by a crowd to “go home”.

“My dream of society is a society where women are free and proud of their bodies,” said Vallaud-Belkacem. She warned that with tensions high after a series of terrorist attacks claimed by the Islamic State, “we shouldn’t add oil to the fire” by banning burkinis.

But moments after Vallaud-Belkacem spoke, her comments were flatly contradicted by Valls, who reiterated his support for mayors who have banned the garments. Asked if the decrees amounted to racism, Valls said: “No, that’s a bad interpretation.” He said the full-body swimwear represented “the enslavement of women”.

Valls has said he supports the mayors who have issued local short-term decrees against burkinis, while refusing their demands for nationwide legislation against them.

The state council’s ruling is likely to set a precedent for other towns that have banned the burkini. The administrative court in Nice ruled on Monday that the Villeneuve-Loubet ban was necessary to prevent public disorder after the Bastille Day attack in Nice and the murder of a priest in Normandy.

Sarkozy is seeking to win back votes from the far-right FN, whose rising popularity mirrors that of populist politicians in other countries that have appealed to voters concerned about globalisation and immigration, such as Republican presidential nominee Donald Trump in the US and the leaders of Britain’s Brexit campaign.

For months Sarkozy lagged in opinion polls behind Alain Juppé, the centrist former prime minister, but his popularity, which had already started improving with party sympathisers in June, rose after Islamist attacks on a Bastille Day crowd in Nice and on a priest in Normandy.

The political row over burkinis has intensified after a woman in a headscarf was photographed on a beach in Nice removing a long-sleeved top while surrounded by armed police.

The city banned the burkini on its beaches last week, following about 15 seaside areas in south-east France where mayors had done the same.

The series of pictures, taken by a local French news photographer, showed a woman dressed in leggings, a long-sleeved tunic and headscarf being approached by four officers. As the police stand around her, she removes her long-sleeved top, revealing a short-sleeved top underneath. It is unclear whether or not the woman was ordered to do so. In another image, a police officer appears to write out a fine.

The Nice mayor’s office denied that the woman had been forced to remove clothing, telling Agence France-Presse that she was showing police the swimsuit she was wearing under her tunic.

Nice’s deputy mayor, Christian Estrosi, from Sarkozy’s Les Républicains party, said a municipal police team had “acted perfectly to make sure that [the] decree was respected”. Twenty-four women have been stopped by police in the city since the burkini ban came into force.

The various mayoral decrees do not explicitly use the word burkini; instead they ban “beachwear which ostentatiously displays religious affiliation”, citing reasons such as the need to protect public order, hygiene or French laws on secularism.