President Emmanuel Macron's party chose his health minister to run for mayor of Paris after the release of sex videos led its initial pick to withdraw.
The last-minute change - the mayoral election's first round is on March 15 - is the latest setback for the French President, whose approval rating dropped to a national poll average of 32 per cent in January.
The videos and an alleged text message exchange between Benjamin Griveaux and a woman were published on a website last Thursday.
Griveaux, 42, a former spokesman for Macron's Government, withdrew from the race, saying his family "doesn't deserve that."
La Republique En Marche, Macron's party, picked Agnes Buzyn today as its replacement candidate, Agence France-Presse reported.
She's a party heavyweight, has served as a Cabinet minister since Macron took office and has been at the centre of France's coronavirus response.
Polls suggest that Macron's party was already struggling in the Paris race after a former party member, mathematician Cedric Villani, refused to clear the way for Griveaux and decided to run as an independent.
Mayor Anne Hidalgo, a Socialist, is running for re-election. Rachida Dati is the candidate of the right-wing party Les Republicains.
Activist and artist Petr Pavlensky told French media he was behind the release of the videos.
Pavlensky, known for performances that included nailing his scrotum to Moscow's Red Square in 2013, has been based in France since obtaining asylum.
He and his partner were taken into custody today as part of an investigation into the videos after Griveaux filed a complaint, AFP reported, citing prosecutors.
The Griveaux episode drew condemnation across France's political spectrum, including from his adversaries.
The Le Monde newspaper labelled it a confirmation of the "Americanisation of French political life."