A left-wing former culture minister was on course to be elected Ireland's president on Friday, beating a former IRA commander and a TV reality star, early tallies showed as one of his rivals conceded defeat.

Michael D. Higgins, a champion of Palestinian rights and a member of junior coalition partner Labour Party, was ahead in most voting tallies across the country, state broadcaster RTE reported.

It's very clear that we will have a President Michael D. Higgins, said David Norris, a gay-rights campaigner who said he expected to come third or fourth.

Weeks of mud-slinging between the seven candidates vying for the largely ceremonial role have distracted Ireland from its financial crisis.

But they also raised serious questions about the role in Irish politics of Sinn Fein, one-time allies of the Irish Republican Army (IRA) guerrillas, and about the depth of support for the centre-right Fine Gael party, which swept to power in February.

Early tallies indicated that the party of Prime Minister Enda Kenny would struggle to come fourth with a small fraction of the 36 percent of the vote the party secured in February.

Irish presidential elections are contested more on personality than policy or party and the Fine Gael candidate, Gay Mitchell, consistently failed to shine.

MCGUINNESS SPLITS OPINION

The results indicated that independent candidate Sean Gallagher, a businessman who shot to fame through reality television, had failed to recover from a scandal that broke after the final opinion poll gave him a 15 point lead.

Disclosures over his ties to Fianna Fail, the party blamed for Ireland's economic collapse, at the end of a grubby campaign prompted bookmakers to make Higgins the favourite.

It's over, said Eoin O'Malley, a politics lecturer at Dublin City University. Gallagher's vote has more or less collapsed in those areas where he had to be polling really strong.

O'Malley said former IRA commander Martin McGuinness may take third place with around 15 percent of the vote, in line with the last opinion polls and an improvement on the 10 percent of votes it secured in February's election

If McGuinness gets 15 percent I would say the party will be privately disappointed. But his campaign didn't catch fire and he didn't deal terribly well with the attacks on his past, he said.

McGuinness, once a leading figure in the IRA's fight against British rule in Northern Ireland, shook up an initially dull race, splitting opinion and prompting some government ministers to paint him as a villain.

Once the political wing of the now-defunct IRA, Sinn Fein has always campaigned for a united Ireland and is trying to move into the political mainstream in the Republic of Ireland, where its members were banned from speaking on the media until 1993.

Buoyed by public anger over an economic crisis that led to an EU/IMF bailout of Ireland late last year, Sinn Fein tripled its score to a record 14 of parliament's 166 seats in February.

The first official results were expected in the afternoon, although the final result may not be published until Saturday.

Votes are also being counted Friday in a by-election that is expected to deprive Fianna Fail of its last member of parliament in the capital.

Referendums on whether to allow the government to cut the pay of judges and to boost the power of parliamentary committees will also be decided.

(Editing by Alison Williams)