A few weeks ago, Ireland appeared to be on the cusp of what was dubbed a “political miracle” with a former Irish Revolutionary Army (IRA) commander accused of having blood on his hands likely to win the country's presidency. But on Thursday, as voters headed for polling stations, there was an air of an imminent anti-climax with an uncharismatic Labour contender and a businessman barely known outside Ireland and embroiled in a fundraising scandal, reported to be in the lead — in that order.

While pollsters wrote off the prospects of Sinn Fein's Martin McGuinness after his campaign suffered because of controversy over his IRA past, his two immediate rivals — Labour's Michael D. Higgins and industrialist Sean Gallagher — were head-to-head in opinion polls with Mr. Higgins one point ahead of his rival.

The elections are being held to replace Mary McAleese, who has been Ireland's President since 1997 having won two successive seven-year terms. Under the Irish Constitution a President can be re-elected only once. It is essentially a ceremonial post with few executive powers.

When the election campaign began, Mr. McGuinness, currently the Deputy First Minister in Northern Ireland's coalition government, appeared to be emerging as the most exciting and charismatic choice in a field dominated by dour and little-known contenders. But as questions about his IRA past — he was its chief of staff at the height of the organisation's bloody campaign — were raised and with families of IRA's victims particularly uncomfortable about his candidacy his ratings plunged making Mr. Gallagher the frontrunner.

Yet, Mr. McGuinness could end up having the last laugh, for it was he who ambushed Mr. Gallagher during a television debate over allegations that he secretly raised funds for the Fianna Fáil party which was ousted from power earlier this year after being accused of being responsible for plunging the nation into recession.