By Richard Lough
PARIS (Reuters) - When Nicolas Sarkozy went fishing for votes in the electoral waters of France's far right for a second presidential term in 2012 it ended in defeat, as voters alienated by his rhetoric and disappointed by a moribund economy deserted him.
Fast forward four years and the conservative is banking on a change in mood.
Islamist attacks on French soil have killed some 230 people since January, 2015. Europe's migrant crisis has exacerbated concerns about immigration and fueled the rise of far-right Front National leader Marine Le Pen.
An Ifop poll in July showed security trumping unemployment as the hot-button issue of the 2017 race despite an economic malaise and Sarkozy's comeback bid pitches him as a president who would be tough on security and immigration.
In a new book entitled "Everything for France", to be published on Wednesday, Sarkozy courts National Front voters with a promise to limit the right to French nationality of children born to immigrants.
He pledges to suspend the right of immigrants to bring immediate family members to live in France until the European Union draws up what he says is a coherent immigration policy. And he vows to "drastically reduce" the number of migrants France accepts and end economic migration within five years.
By promising to ban the Muslim head scarf from universities and public companies he furthermore presents himself as an energetic defender of the secular state that is a key part of France's identity.
Sarkozy said France's biggest battle would be how "to defend our lifestyle without giving into the temptation of cutting ourselves off from the rest of the world," a veiled reference to British voters' decision in June to leave the European Union - in part due to concerns over immigration.
The Nice attack on crowds celebrating the Bastille Day national holiday and the murder of a Catholic priest in a Normandy Church have shifted the focus of the campaign away from the economy and toward Sarkozy's strongest suit, said Frederic Dabi at pollster IFOP.
At the turn of the year, opinion polls showed him well behind Alain Juppe, a mainstream conservative and his principal rival for the Republicains nomination, both among party supporters and the center-right more broadly.
Now, Sarkozy leads Juppe by 63 percent to Juppe's 36 percent among the party faithful, an Elabe poll showed on Tuesday. However the primary is open to any voter who pays 2 euros (dollars) and signs a pledge that they agree with the "values of the right and center".
That wider constituency favors Juppe. The Elabe poll gave him 53 percent support to Sarkozy's 46 percent, underscoring the challenge facing the one-time interior minister.
"Sarkozy is in the stronger position, even if - for now - Juppe remains ahead in voter support," said Dabi. "The primary race on the right will be somewhat hardline in tone. That doesn't have to mean that Juppe fails."
"NOT SEEKING REVENGE"
Monday's comeback announcement was vintage Sarkozy: drawing parallels between the challenges awaiting the next president with those that confronted war-time hero Charles de Gaulle, the architect of France's current political system.
In his first term, Sarkozy's high-energy style and abrasive manner polarized voters, while his modest attempts at tax and labor market reform and limited success fostering job creation disenchanted both free-marketeers and leftist voters whom he had also assiduously courted to win election.
After his May 2012 defeat to Francois Hollande, Sarkozy promised to quit politics altogether, but returned to the fray in September 2014 citing the need to rescue France from what he described as the socialist's catastrophic presidency.
"I am not seeking revenge, I have no egotistical score to settle," Sarkozy said on social media on Monday as he announced his bid.
While Juppe has kept a low profile over the summer -- campaigning for the primary in November is expected to hot up in the days ahead. Juppe holds a rally outside Paris this weekend.
Sarkozy's leftist opponents, meanwhile, have been swift to attack the former president's social policies.
"This policy platform is a platform for the division of French people, not their coming together," Socialist lawmaker Jean-Marie Le Guen told Europe 1 radio.
Le Guen said Sarkozy's economic platform would favor the wealthy. Sarkozy's friendships with the rich, powerful and the world of showbiz earned him the nickname "President Bling Bling" and caused widespread distaste on the left but also in some conservative circles.
($1 = 0.8833 euros)
(Additional reporting by Marine Pennetier; Editing by Jon Boyle)