Northern Ireland's political parties have until Friday morning to reach agreement on justice and policing, Gordon Brown and Irish taoiseach Brian Cowen demanded today.
The Democratic Unionist party (DUP) and Sinn Fein have two days to consider proposals in detail before the British and Irish governments step in and attempt to impose their own solution on the impasse.
The devolution of policing and justice powers to the Stormont executive is the cause of the impasse between the parties, but the premiers said in a joint statement that progress had been made "slowly but surely".
Mr Brian and Mr Cowen have spent the last 48 hours working with party leaders on the Northern Ireland political crisis at Hillsborough Castle outside Belfast.
"We believe there is a realistic prospect of a reasonable agreement," Mr Brown said this afternoon.
Ireland's foreign minister and Northern Ireland secretary Shaun Woodward will remain in Belfast for consultation before the two countries' leaders reassess progress on Friday morning.
"If we judge that insubstantial progress has been made we will publish our own proposals for a resolution of these issues," the prime minister added.
"We believe it's far better the parties themselves agree the proposals... but if there is no agreement by Friday morning... we will publish our proposals for the agreement."
In a joint statement published this afternoon the prime minister and taoiseach said a "firm basis" existed for beginning the final stage of devolution by May.
They want a new justice department to be established and the relationship between the justice minister and the executive to be agreed.
The management of contentious parades, which have also threatened disagreement, is addressed. It is proposed they are managed under a framework "in a way that guarantees respect, dialogue, transparency and independence".
At stake is Stormont's powersharing arrangement between the two parties. If either the DUP's first minister Peter Robinson or Sinn Fein's deputy first minister Martin McGuinness resign the other will also have to quit, triggering elections and the end of their powersharing arrangements.
Mr Brown's normal weekly engagements had been pushed back to cope with the political crisis in Northern Ireland. Cabinet's normal Tuesday meeting has been delayed until tomorrow and Mr Brown did not appear at this lunchtime's prime minister's questions.
"The importance of these decisions for the future of Northern Ireland cannot be underestimated," Mr Brown and Mr Cowen's joint statement added.
"With leadership and courage, they can be achieved. We are confident that this week's talks leave Northern Ireland better able to overcome divisions, more determined to move forward together, with a greater understanding of what unites communities in Northern Ireland."