Even very early on in the count, it was shaping up to be a very difficult weekend for Sinn Féin and its leader who now faces her second disaster - two out of two - in her second major election in the Republic since she became leader early last year.

Friday night’s exit poll signalled the difficulties ahead. Two of the three European Parliament seats should be safe, but the Dublin seat, held by Lynn Boylan, is in grave danger. Whatever happens with the final counts in Dublin, the party’s vote in the Euros has cratered.

The party’s share of the vote in the local elections was predicted by the exit poll to slump to 12 per cent - a number which horrified the party and had activists hoping it wasn’t true. When the votes were counted, it was worse. With most local first counts done on Sunday night, it was less than 10 per cent.

As the hours went by, bulletins from around the country showed what that would mean in seats. The party’s vote collapsed in Tullamore and Birr in Co Offaly, poking the wound opened by the acrimonious departure of TD Carol Nolan over the party’s support for legalising abortion. The pattern was followed all over the country in places where the local organisations had been beset by difficulties.

In Dublin, theparty’s voted halved. Repeated in a general election, there would be a cull of Sinn Féin TDs, reminiscent of the one the party delighted in inflicting on Labour.

In Mary Lou McDonald’s home patch in Dublin Central, the party will be struggling to win one seat (though should squeeze over the line). The general election candidate in Tipperary won 267 votes, and won’t even win a council seat.

In Cavan, the party failed to take a seat in two of the three local electoral areas and split the vote in the third, risking returning with no seats on the county council. It Cork, the voted plummeted ten percentage points. In Limerick, just one out of five outgoing Sinn Féin councillors were set to of be re-elected, according to tallies. And so it went, around the country.

The result reverses the upward trend of previous elections. Since the 1990s, when the peace settlement in the North started a political detoxification of Sinn Féin in the South, the party has steadily grown its share of the vote in local and national elections.

In 1994, the party secured 3 per cent of the vote in the European elections. It went to 6 per cent and then 11 per cent in subsequent European votes, rising to 19 per cent in 2014. In the locals, it has gone to from 2 per cent, to three, to eight - back to seven and a half - and up to 15 per cent in the same period.The general election graph looks similar.

It’s not that there haven’t been stutters in the past. McDonald lost her Euro seat in 2009. The party lost one of its Dáil seats in 2007 (though the share of the vote went up). But stutters are one thing; there’s never been a full scale reversal like this. The Sinn Féin election post-mortem could be pretty brutal.

In the past, Sinn Féin’s links to the IRA hurt them with a lot of voters, but as time moves on, and a new non-military generation takes over, that is less of a factor. In a way, that makes the political difficulties more serious.

There’s never one single reason for a big electoral failure. But some reasons are more important than others. Many voters seem unimpressed with the record of Sinn Féin councillors - several of whom, of course, have left the party amid internal difficulties.

The party’s record of internal difficulties, with claims of bullying surfacing regularly over the past five years, points to a culture that alarms some voters. Victims of sexual abuse have raised further questions about the party’s culture and its past ties to a paramilitary code of discipline.

Nor have voters responded to the party’s trenchant opposition to the Government on every issue that emerges in national politics. But if everything is a scandal, nothing is a scandal. The party’s campaigning on Brexit has done it few favours, it seems, perhaps unimpressed by the failure to revive the Northern power-sharing institutions, or even take its seats at Westminster.

But there’s also a more basic question. When McDonald took over the leadership, she was on a mission to enter government in Dublin - as a minority partner if necessary - a strategic move made in tandem with an appeal to the political middle ground, and the middle class. It hasn’t quite worked out that way. And if the main theme an purpose of McDonald’s leadership has been thrown off course, then she will need to do one of two things: get it on back on course, or get a new one.

Some hard thinking, and hard choices, await her.