By Duncan Mackay at the Palazzo Vecchio in Florence

Britain's Brian Cookson has been elected to replace Irelan'ds Pat McQuaid as the new President of the International Cycling UnionSeptember 27 - Britain's Brian Cookson was today elected as new President of the International Cycling Union (UCI), beating Ireland's Pat McQuaid by 24 votes to 18 here.

It brings to an end to the controversial eight-year reign of 64-year-old McQuaid, which has been overshadowed by drugs scandals, highlighted by Lance Armstrong, and allegations of corruption and means that he must step down as a member of the International Olympic Committee (IOC).

He owes his position within the IOC to the fact that he is head of an International Federation and in his presentation here he had tried to claim that cycling's position within the Olympic Movement would suffer if he was not re-elected for a third term.

"It is a huge honour to have been elected President of the UCI by my peers and I would like to thank them for the trust they have placed in me today," the 61-year-old Cookson, President of British Cycling, told the delegates afterwards in the magnificent Palazzo Vecchio.

"The campaign to get to this point has been intense but I am under no illusion that the real work starts now.

"So I call on the global cycling community to unite and come together to help ensure that our great sport realises its enormous potential.

"This is the vision that will drive and focus my activities over the next four years.

"I have said throughout my campaign that we must embrace a new style of governance and a collegiate way of working so that a new era of growth and commercial success for the UCI and our sport can begin.

"My first priorities as President will be to make anti-doping procedures in cycling fully independent, sit together with key stakeholders in the sport and work with WADA (World Anti-Doping Agency) to ensure a swift investigation into cycling's doping culture.

"It is by doing these things that we will build a firm platform to restore the reputation of our International Federation with sponsors, broadcasters, funding partners, host cities and the International Olympic Committee.

"Ultimately this is how we grow our sport worldwide and get more riders and fans drawn into cycling.

"Finally, while there have been some difficult moments between myself and my opponent Pat McQuaid during this election contest, I would like to thank Pat for the contribution he has made to cycling during his long career.

"I wish him well in whatever he goes on to do."

Brian Cookson is congratulated by Pat McQuaid after being elected to replace the Irishman as President of the International Cycling UnionBrian Cookson is congratulated by Pat McQuaid after being elected to replace the Irishman as President of the International Cycling Union

The decision followed a Congress that at times descended into a farce, particularly during the long debate over whether McQuaid was eligible even to stand. 

It led to the delegate from Algeria to describe it as a "show and masquerade". 

Having been proposed by both Cycling Ireland and the Swiss Cycling Federation, where he is from and now lives respectively, only to have them both revoked after they came under pressure, there was doubts over whether McQuaid had a valid nomination.

But it was revealed by Portugal's Artur Lopes, the senior vice-president of the UCI who stood in for McQuaid to run the election, that the decision by the Swiss Cycling Federation to withdraw the nomination came only after the time-frame for such changes had closed, which is illegal under the country's law according to a legal expert to addressed the Congress.

McQuaid also argued that, as he was a member of both associations, his nominations from Morocco and Thailand should stand, a position backed by another expert in Swiss sports law who spoke to the Congress.

It was only after a long period of arguing about whether McQuaid's nomination was valid or not that Cookson decisively put an end to the impasse by taking the microphone and declaring, "We've had enough of this. I'm going to propose we go straight to the vote between the two candidates."

It was a command very much welcomed by delegates who had sat in the Congress on uncomfortable chairs for more than five hours without a break, including a long debate over whether they should even be able to vote on the controversial proposed amendment to Rule 51 in the UCI Constitution, changing who could nominate a candidate to stand for President.

New Zealand delegate Richard Leggat claimed that any such decision on that issue should not take place until next year and when a vote was held on whether to vote it ended 21-21 which meant, that under the UCI Constitution, there would be no vote on Rule 51.

So by the time it came to actually vote for the top job the tension was intense and Cookson's bold decision to waiver any opposition to McQuaid's eligibility paid off.

As soon as Lopes read out the result and got to "Cookson 24....." the Salone del Cinquecento, the room where the Congress was taking place, erupted into cheers led by Britain and the other countries who had supported him, including Australia, New Zealand and the United States, as they knew that "22" was the magic number needed to beat McQuaid.

Pat McQuaid had warned that cycling risked losing its influence within the Olympic Movement if he was not re-elected President of the International Cycling UnionPat McQuaid had warned that cycling risked losing its influence within the Olympic Movement if he was not re-elected President of the International Cycling Union

It was perhaps fitting that Machiavelli's office was located in this building when he was Secretary of the Republic in the 16th century such has been the negative tone of this campaign.

Earlier, the UCI Ethics Commission revealed that they had received a complaint yesterday from the Hellenic Cycling Federation that they had been offered €25,000 (£21,000/$34,000) to support the Tour of Hellas in return for backing Cookson's campaign.

But they claimed that they could not investigate the allegation properly at such short notice.

Peter Zevenbergen, the Dutch head of the Commission, had also heavily criticised Russian oligarch Igor Makarov and American Mike Plant, both prominent members of the UCI Management Committee and declared supporters of Cookson, who were behind a dossier on McQuaid which made a series of serious allegations linked to failed drugs tests involving top riders.

But, despite several requests, neither had been prepared to hand over the dossier so it could be investigated properly.

Makarov responded by claiming that he did not trust the Commission because they were too closely linked to McQuaid. 

It summed up how the four-month campaign has been marked by bitterness and bad blood between the two candidates, even if it did end with McQuaid shaking Cookson's hand after declaring that "Congress has spoken". 

But such was the interest in the election that by the time of the vote Brian Cookson, Pat McQuaid and UCI were all trending on Twitter, the microblogging site. 

Among those to welcome the defeat of McQuaid was Armstrong, who Tweeted simply: "Hallelujah".

Contact the writer of this story at [email protected]

Related stories
September 2013: McQuaid hoping new anti-doping appointments will help UCI Presidential election chances
September 2013: Exclusive - Cookson accused of "subversive legal tactics and intimidation" in UCI election campaign
September 2013: Cookson is best qualified to lead the UCI, says USA Cycling
September 2013: Exclusive - European Cycling Union admit they have no control over whether delegates vote for Cookson or not
September 2013: Cookson gets backing of Europe for UCI Presidential election