French President Emmanuel Macron’s preferred candidate for Paris mayor has withdrawn his bid over a leaked sex video.

Benjamin Griveaux resigned from a ministerial job last year to take part in the mayoral race.

A close ally of President Emmanuel Macron announced on Friday that he was pulling out of the race to become mayor of Paris after a website published a leaked sex video related to his private life.

The withdrawal of Benjamin Griveaux is a heavy blow to the president’s centrist La Republique En Marche party, which is hoping to use the prestigious position of mayor of the capital to build a local power base.

“An internet site and social media have published ignoble attacks on my private life,” Griveaux said.

“For more than a year, my family and I have been subjected to defamatory remarks, lies, rumors, anonymous attacks, the revelation of stolen private conversations and death threats,” he said in a televised address, saying that the publication of the alleged sex video on Thursday was “going too far.”

Rift in Macron’s party

Griveaux, who resigned as a junior minister and government spokesman in March last year to take part in the race for mayor, had so far failed to garner the support needed. Polls put him in third place behind current Socialist Mayor Anne Hidalgo and conservative challenger Rachida Dati.

Macron’s choice of Griveaux as candidate led to a rift in the En Marche when high-profile Macron supporter Cedric Villani was asked to step aside. Villani refused and was expelled from the party as a result.

Villani, a star mathematician, is now running as an independent in the March local elections.

Macron is expected to run again for president in 2022, and winning the Paris mayoral position would be a big boost for his party, particularly in light of the expected losses in rural areas caused by some of his labor policies, which are seen by many as unfairly burdening the less well-off.