Returning from the political wilderness, former French president Nicolas Sarkozy has taken a big step towards a possible re-election bid by winning the leadership of the conservative party.
Mr Sarkozy had been widely expected to win the Union for a Popular Movement leadership in the vote by party members. The victory advances his hopes of running in the 2017 presidential race.
The 59-year-old Gaullist collected 64.5% of the vote to defeat former government ministers Bruno Le Maire and Herve Mariton.
Mr Sarkozy has re-emerged on the political scene in recent months after all but disappearing following his loss to Socialist Francois Hollande in the 2012 election.
The party, known as the UMP, will choose its presidential nominee in 2016.
Nearly 270,000 dues-paying party members were eligible to vote.
The online system used came under an "organised" cyber attack that temporarily slowed down voting, UMP secretary-general Luc Chatel told France-Info radio.
He said the party was filing legal action against the unidentified hackers behind the attack, and that police were investigating.
Mr Sarkozy has used the UMP leadership as a springboard before. He also won it in 2004 - with 85% of the vote - and built a ground game that helped propel him to victory in the presidential race three years later.
Conservatives are sharpening their political knives. Polls show that Mr Hollande is the least-popular French leader in modern history largely for his failed promise to bring down a double-digit unemployment rate.