The 42-year-old MP said he opted for retreat to protect his family after a website published video excerpts of a man masturbating, accompanied by screengrabs of racy text messages, which it said came from the former government spokesman.

It then spread on social media.

"A website and social networks have launched vile attacks concerning my private life. My family does not deserve this. No one should ever be subjected to such abuse," Griveaux said at AFP headquarters in Paris.

"For more than a year, my family and I have been subjected to defamatory remarks, lies, rumours, anonymous attacks, the revelation of stolen private conversations and death threats," he said.

"As if this was not enough, yesterday a new level was reached," said Griveaux, adding he was not willing to expose his wife and children any further.

"This is going too far."

The Liberation newspaper reported Friday that Russian performance artist Pyotr Pavlensky claims to have put the video online in order to expose the ex-candidate's "hypocrisy".

He said he got the video from a "source" who had a consensual relationship with Griveaux.

"He is someone who constantly brings up family values, who says he wants to be the mayor of families and always cites his wife and children as an example. But he is doing the opposite," Pavlensky told the daily in a telephone interview on Thursday night.

Support for Griveaux

"I don't mind people living the sexuality they wish... but they have to be honest," said the protest artist best known for nailing his scrotum to the cobblestones of Red Square in 2013.

"He wants to be the head of the city and he lies to voters. I now live in France, I am Parisian, it is important for me."

The ambitious Griveaux helped found the Republic on the Move (LREM) party, but recent polls showed him trailing in third place in Paris, which Macron won comfortably in the 2017 presidential election.

Macron tapped Griveaux to be the LREM's Paris mayoral candidate, causing a rift in the party that led to the president asking rival Cedric Villani to step aside.

Villani refused, triggering his exclusion from the ruling party.

On Friday, Villani said the "undignified attack" that led to Griveaux's withdrawal was a "serious threat to our democracy" and offered his support to the former candidate and his family.

Calls to respect privacy

Socialist Mayor Anne Hidalgo, who leads the race in opinion polls, called for "the respect of privacy and of people."

Wresting control of the capital would be a huge prize for Macron as he seeks to consolidate his base ahead of an expected re-election bid in 2022.

It would also help offset heavy losses he is expected to face in rural areas, where his policies have met fierce resistance and fired up the "yellow vest" protest movement.

One of Macron's closest political allies, Griveaux resigned as a junior minister and government spokesman in March last year to run for mayor.

Griveaux told AFP he had discussed the issue with Macron late Thursday, and that the president offered his support "whatever my decision", while urging him to protect his own.

As for the LREM's project for Paris, he said it would continue "better without me".

"Parisians deserve a dignified campaign," Griveaux said as he bowed out with a final "thank you".

He was due to attend a meeting of the LREM later Friday to plan a new strategy for the party.