Image copyright AFP Image caption NI political parties were expecting another battle for their Stormont seats, but they may now have to fight to keep their Westminster seats too

Northern Ireland parties have been arguing over the prospect of a second Stormont election within two months, but they now have another challenge.

The Prime Minister's plan to call a snap general election is a sharp U-turn that could throw Stormont's faltering institutions even further off course.

Talks to save devolution stalled before Easter with little hope of a deal.

With the Democratic Unionist Party warning Northern Ireland was heading towards direct rule, the prospect of a Westminster poll complicates matters even further.

DUP leader Arlene Foster has said the snap general election on 8 June would provide the people of Northern Ireland with the opportunity to "vote for the union".

She was criticised after the Northern Ireland Assembly election last month because the poll showed a surge in support for Sinn Féin and the end of the unionist majority at Stormont.

Mrs Foster has called on her voters to "unite around a strong Democratic Unionist Party that will advocate for them in Parliament".

Image caption The DUP has eight of Northern Ireland's 18 MPs, making it the fifth largest party in the House of Commons

Sinn Féin welcomed news of the Westminster poll, with leader Gerry Adams tweeting: "So Ms May has called a British General Election. Sinn Féin is up 4 that! Another chance 2 vote against Brexit & 4 progress."

However, Colum Eastwood, the leader of the Social Democratic and Labour Party (SDLP) was less than pleased about the prospect.

"It shows you how much @TheresaMayPM thinks/cares about our peace process that she'd call an election in the middle of talks," he tweeted.

Certainty guaranteed?

Northern Ireland's two largest parties, the DUP and Sinn Féin, have spent weeks blaming each for the failure to restore Stormont's power-sharing government.

Under the terms of the 1998 Good Friday Agreement, any new executive government must be a coalition of both unionists and nationalists.

However, long-running rows over a proposed Irish language act and deep divisions over how to deal with the legacy of the Troubles are holding up a deal.

Analysis - BBC political correspondent Stephen Walker

A snap general election complicates the talks process at Stormont and is a scenario that was not factored in when the discussions were paused for Easter.

Those talks are expected to resume again shortly but history suggests that it is always difficult to cut a political deal at election time.

It is very hard to hold talks in the morning with your opponent and then go canvassing in the evening.

Political parties react differently when there is an election looming.

The DUP and Sinn Féin are also diametrically split over Brexit - the issue driving Prime Minister Theresa May's plan to hold a general election.

Mrs May said the poll would "guarantee certainty" during negotiations with the EU, after Labour, the Scottish National Party and the Liberal Democrats threatened to vote against her government's final Brexit deal.

Northern Ireland currently has 18 MPs, with the DUP out in front with eight Westminster seats - making it the fifth largest party in the House of Commons.

Sinn Féin has four Westminster seats, having lost one in the last general election in 2015.

However, under its long-standing policy of abstentionism in protest against British rule, Sinn Féin MPs do not take their seats in the Commons.

The Ulster Unionist Party was the biggest winner in the last Westminster poll, having gained two seats.

Like Sinn Féin, the Alliance Party lost a seat in the 2015 vote, while the Social Democratic and Labour Party remained static with three seats.

Could we have a general election and a Northern Ireland Assembly election on the same day?

Our political correspondent Stephen Walker says: "Technically you could - although the government may want to call an assembly election only as a last resort.

"There is an argument that two elections on the one day can be cumbersome.

"In terms of a lack of an Executive being formed in Northern Ireland, Secretary of State James Brokenshire needs to push through emergency financial measures to keep things afloat, like rates.

"If an election does take place in June, he will have to do that in the coming days, before the Westminster parliament is dissolved."

In the most recent Stormont poll, the DUP retained its position as the largest political party in Northern Ireland.

However, its lead over Sinn Féin was cut from 10 seats to just one.

Calling the shots

The snap election was held in March after the power-sharing government was brought down by a row over a botched green energy scheme.

The result was a close shave for the DUP, and a difficult day for unionism in general, as it brought an end to the unionist majority at Stormont for the first time in history.

Unionists and nationalists now hold an equal number of seats, with non-aligned parties holding the balance of power.

However, how much power any of them will wield is still unclear, as more than two months after the poll, the parties have not been able to form a coalition.

Sinn Féin called for a second snap Assembly election if no deal is reached by May, but the DUP warned another poll would not solve the issues - voters could end up with direct rule from Westminster.

But who will be calling the shots from Westminster?

It'll be a long, hot summer - in the political world at least.