DUBLIN — A seismic election in Ireland has reshaped the traditional electoral landscape, with the left-wing nationalist party Sinn Féin surging into first place ahead of the traditionally dominant Fine Gael and Fianna Fáil for the first time in the history of the republic.

"The two-party system in this country is now broken, it has been sent to the history books," said Sinn Féin leader Mary Lou McDonald as she arrived at a Dublin count center.

Counting is still underway and with the race so close, the ultimate seat breakdown may not be known for days. But with almost all first-preference votes tallied, Sinn Féin had won the popular vote with 24.1 percent ahead of Fianna Fáil on 22.2 percent and Fine Gael on 22.1 percent. No party will have enough seats to easily form a government, but the fallout is already becoming apparent.

Here are the five key takeaways from Ireland’s earthquake election.

1. Sinn Féin surge

The left-wing nationalist Sinn Féin is likely to form part of the next government for the first time.

The party has steadily increased its votes in every general election since 2007 by broadening its profile from a single-issue party in favor of the unification of Ireland into an advocate of a more left-wing alternative to the traditionally dominant Fine Gael and Fianna Fáil parties.

As memories recede of the party’s past association with the militant struggle against British rule in Northern Ireland, support has surged among the young: Exit polls indicate it leads among all sectors of the electorate under 65.

The party, led by popular new leader Mary Lou McDonald, rode a wave of anger over a crippling housing crisis that prevented young people starting families; it promised rent freezes and ”the biggest public housing building programme in history of the state.”

“We have a cohort of younger voters who vote on issues rather than parties ... They have obviously identified Sinn Féin’s message on that issue as something to rally behind,” said Jonathan Evershed, a researcher at University College Cork and Queen’s University Belfast.

2. Leo Varadkar is not a vote-winner

Incumbent Prime Minister Leo Varadkar may have a reputation abroad as a modern and polished statesman, but his domestic image differs from this substantially.

Unusually for an Irish politician, the prime minister is socially awkward, and has not emerged as the ruthless vote-winner his party hoped he would be when they chose him to replace Enda Kenny in 2017.

Though Fine Gael spearheaded the landmark liberal reforms of legalizing gay marriage in 2015 and abortion in 2018, it is primarily defined by its pro-business, budget-balancing economic policies.

“While the rest of the world may see an impressive, gay, Irish-Indian Taoiseach [prime minister], in Ireland people ... primarily see him as the leader of Fine Gael who has really taken a small-c conservative line,” said Maura Adshead, a political scientist at the University of Limerick.

Discussions have already started in party circles of a challenge to Varadkar’s leadership, with the name of Foreign Minister Simon Coveney — the popular runner-up in the 2017 leadership election — doing the rounds.

3. Coalition-building won't be easy

Sinn Féin leader McDonald said she has already reached out to leaders of small left-wing parties to explore coalition options.

"My first priority is to establish whether we can form a government without Fianna Fáil or Fine Gael," McDonald said. But the arithmetic may be difficult, and Sinn Féin is open to teaming up with one of them to enter government for the first time.

During the campaign, Fianna Fáil ruled out a coalition with Sinn Féin on principle. But this proved unpopular with voters. As the extent of its support emerged, Fianna Fáil appeared to soften its tone.

“There were genuine concerns there, but everybody is cognizant that the people have spoken” said Fianna Fáil lawmaker Marc MacSharry, while simultaneously denying the party had changed its position. The party has already begun feeling out options to increase its power in parliament, courting a series of independent lawmakers.

Fine Gael has said it is willing to do a deal with Fianna Fáil, but not Sinn Féin; though some party members think a period in opposition would be best for the party.

With the race so close, it all depends on battles for the final seats in a range of constituencies that are expected to go down to the wire. The one party that is almost certain to be included in a coalition however is the Green Party, which was set to increase its seats from two to more than 10.

If no government can be formed, Ireland faces another election.

4. Brexit was a nonissue

Varadkar hoped to benefit from widespread public approval of his defense of Ireland’s interests in the Brexit negotiations, and put the issue front and center in the campaign.

But it fell flat with voters: Only 1 percent said it was important to them in deciding how to vote.

The most important issues for voters were health and housing.

“Although Brexit was negotiated by his team, a large part of that negotiation is by the Irish state, the civil servants,” said political scientist Adshead.

“Given the fact that there was cross-party support, it’s quite hard for him to take personal credit for what was a national consensus.”

The most important issues for voters were health and housing, reflecting unhappiness with strained public services that have struggled to keep up with a growing population and an economy developing at the fastest rate in the European Union.

5. Nativist politics flop

There was a well-organized attempt during the campaign to establish anti-immigration, nativist politics in Ireland, which has so far not experienced the radical right surge seen around the world.

However, just 1 percent of voters felt immigration was an important factor in their vote, according to the exit poll.

Instead, the biggest gains in support were enjoyed by Sinn Féin and the Green Party, both of which shun anti-immigration politics and speak in favor of the rights of refugees.