Dublin - Ireland's general election has seen Sinn Fein surge from fringe nationalist party with links to a paramilitary past, to become the second largest in terms of parliamentary seats.
Their centre-right rivals Fine Gael, of Prime Minister Leo Varadkar, and Fianna Fail, led by Micheal Martin, have both ruled out doing a deal with Sinn Fein.
But as talks get under way for a coalition government, that hard-and-fast stance could give way or Sinn Fein could engineer support from several smaller parties playing kingmaker roles.
Here are some of the likely scenarios:
- A broad left alliance -
Following the fractured vote, forming a majority government will need the agreement of at least three parties to reach the 80-seat threshold in the Dail, Ireland's lower house of parliament.
Sinn Fein leader Mary Lou McDonald -- whose party won 37 seats -- is in talks with several smaller, left-leaning parties, including the Greens, the largest of them with 12 seats.
But even if she gained all of their support, Sinn Fein would still need the backing of at least 14 of the 21 independents elected -- a difficult challenge.
Which is the biggest party in Ireland's lower house of parliament?
- Fianna Fail/Sinn Fein -
Sinn Fein could instead look to broker an alliance with Fianna Fail, who finished just behind them in the popular vote but won 38 seats once second preferences were counted.
But their policy platforms diverge significantly and their combined 75 seats would still require buttressing from a smaller party or independents.
Fianna Fail's Martin's pre-election pledge not to work with Sinn Fein in government already appears to be easing.
"I'm a democrat. I listen to the people," he said as the count got under way earlier this week.
Who is Mary Lou McDonald?
McDonald has also left the door open to talks with Fianna Fail but could be wary of denting her party's popularity and political outsider status.
Ireland's Labour party and the Green party have both previously suffered at the polls after entering coalitions with the mainstream centre-right parties.
There could also be disagreement over the top jobs, given the close nature of the results.
Both McDonald and Martin could insist on the role of prime minister -- known as Taoiseach -- given Sinn Fein won the popular vote while Fianna Fail ended up with one more seat in parliament.
Sinn Fein leader hails historic election win
- Fianna Fail/Fine Gael -
Both Sinn Fein and Varadkar's Fine Gael have ruled out working together to form a new government.
However, a coalition between Fianna Fail and Fine Gael -- the two centre-right parties which between them have held power in Ireland for a century -- is possible.
They have worked together in a confidence and supply agreement since the 2016 election.
Together they hold 73 seats, so would also require the support of one of the smaller third parties or independents.
But shutting Sinn Fein out of power after it won the popular vote would be controversial, and could further alienate voters while cementing their role as the official opposition.
On Wednesday, Varadkar seemed to accept his party would not be in the next government.
"We were defeated so that means that people are saying to us that Fine Gael should go into opposition and we are absolutely willing to do that," he told state broadcaster RTE.
- Another election -
The Dail reconvenes on February 20. A government does not have to be formed by then but if talks are deadlocked, another election could be called.
Sinn Fein only stood 42 candidates in Saturday's ballot and would likely run more in the next election, which could see it take more seats and potentially become Ireland's biggest party.
This could now be in the back of McDonald's mind as she tries to thrash out a deal.
"I'm pretty sure Sinn Fein don't want to go into government yet," Eoin O'Malley of Dublin City University, told AFP last week.
"I suspect what it really wants is another election relatively soon. And I think that may be what could happen."
Irish voters react to Sinn Fein election win
By Joe Stenson