Former President Nicolas Sarkozy’s political party, already enfeebled by a chaotic national leadership election last year, faces further ridicule in a Paris town hall primary election which ends tonight.

An “online-primary”, claimed as “fraud-proof” and “ultra secure”, has turned out to be vulnerable to multiple and fake voting. The four-day election has also the exposed the poisonous divisions created within the centre-right Union Pour un Mouvement Populaire (UMP) by the law permitting gay marriage which took effect last week.

France’s first “electronic election” had been expected to anoint a rising star of the moderate right, Nathalie Kosciusko-Morizet, 39, as the party’s candidate in the election for mayor of Paris next spring. The former environment minister, known as “NKM”, was runaway favourite to win in the first round until she abstained in the final parliamentary vote on same-sex marriage in late April.

Download the new Independent Premium app Sharing the full story, not just the headlines

Several hard-right figures within the party have since urged militant opponents of gay marriage to swamp the open primary with votes for a relatively, obscure, young Paris city councillor, Pierre-Yves Bournazel, 35. Although Mr Bournazel has been “gay-friendly” in the past, he has emerged – cynically, say his critics – as a standard bearer for the virulent right-wing opposition to the new law.

What was already shaping up as a tense and close election was thrown into utter confusion at the weekend. Journalists from the news site Metronews proved that it was easy to breach the allegedly strict security of the election and vote several times using different names.

To register their vote on-line, Parisians were supposed to make a credit-card payment of €3 and give the name and address of someone on the city’s electoral roll. Metronews said that one of its journalists had managed to vote five times, paying with the same credit card, using names, including that of Nicolas Sarkozy.

The discovery generated an explosion of name-calling within the party and calls by Mr Bournazel for the primary to be abandoned. After a three-hour crisis meeting on Saturday, the Paris federation of the UMP decided to press ahead but imposed a vow of silence on all four candidates until the first round of voting ends at 7pm this evening. Last November, the UMP almost split amid allegations of ballot-stuffing and other dirty tricks in an election to replace Nicolas Sarkozy as the national party president.

The narrowly defeated candidate, the former Prime Minister, François Fillon, accused the winner, the party secretary general, Jean-Francois Copé of “fraud on an industrial scale”.

Mr Cope “won” by a handful of votes after hundreds of overseas ballots were inexplicably left out of the final count. President François Hollande’s Socialist party sprang joyfully on the main opposition’s party’s new embarrassment yesterday.

The first secretary of the Parti Socialiste, Harlem Desiré said that the UMP Paris primary was shaping up as an “absolute fiasco”.