Face-to-face talks took place at Hillsborough Castle near Belfast
Overnight talks aimed at averting the collapse of Northern Ireland's power-sharing coalition have adjourned.
Sinn Fein and the DUP have been at loggerheads over the devolution of policing and justice powers.
The British and Irish prime ministers were locked in meetings until shortly after 0600 GMT on Wednesday.
A Downing Street spokesman said "there is scope for agreement" though the Irish government cautioned that "some outstanding issues remain".
Sinn Fein and the Democratic Unionist Party - Northern Ireland's two biggest political parties - have been arguing for months over the transfer of policing and justice powers from Westminster to Stormont.
Sinn Fein wants the completion of devolution to happen as soon as possible, but the DUP argues there must be unionist "community confidence" before powers are put in the hands of local politicians.
Mark Devenport, BBC NI political editor
We still know what the bare bones of any possible deal will be.
It involves Sinn Fein getting their date for the transfer of justice powers, getting it this side of the election, and it involves some new structures for parading to deal with the DUPs concerns on that front.
At about 2100 GMT on Tuesday we were beginning to get indications of a very good mood. The plenary session had gone very well.
But during the course of the night, things went much cooler when they start getting into the detail.
Gordon Brown has important engagements. He is meant to be meeting President Karzai of Afghanistan later, so he could be leaving late afternoon and handing it over to Secretary of State Shaun Woodward.
The big question that raises is will that be enough for Sinn Fein or will they feel this is a breakdown?
The "confidence" issue causing most division is over the handling of parades.
The DUP wants to scrap the Parades Commission, which puts conditions on some of the most contentious marches, but Sinn Fein has accused the party of giving the Orange Order a talks veto.
BBC NI political editor Mark Devenport said that, while the mood had looked "good" at teatime on Tuesday, "during the course of the night things went much cooler when they started getting into the detail".
"The question is now, is it an adjournment or is it a breakdown?"
Talks are due to resume mid-morning and Downing Street has said that Gordon Brown will remain in NI and miss prime minister's questions at Westminster.
A Downing Street spokesman said Harriet Harman would deputise for Mr Brown.
Leaving at 0430 GMT, Ulster Unionist leader Sir Reg Empey said there was "no final agreement" yet, but he expected a government statement "fairly shortly".
As he left, Alliance Party leader David Ford - widely tipped to become the Stormont justice minister if the transfer of powers from Westminster can be agreed - said: "It is clear that there is ongoing work happening in the building."
He added that there was an "an air of determination to proceed with the business".
On Tuesday, Mr Brown and Brian Cowen chaired meetings and began more talks with representatives from the individual parties
NI Secretary Shaun Woodward said there was a "willingness to make progress".
David Ford could become Stormont's justice minister if a deal is struck
Mr Woodward said all of Northern Ireland's party leaders had been able to contribute their views at a round-table session.
"There's a real spirit of cooperation, I think, a real willingness to want to make progress, to recognise just what is at stake in the talks.
"I think it was a very constructive hour-and-a-quarter, there's real progress that can be made and we remain standing ready to help the parties in any way we can."
Irish foreign minister Micheal Martin said: "It was a very constructive meeting and I think the taoiseach and prime minister are clear there is a real willingness to make progress on resolving the outstanding issues, and also to facilitate a new dynamic within the executive."
SDLP leader Mark Durkan said: "One of the significant things is that increasingly all parties are admitting devolution has not been performing in a very credible and effective way.
"Maybe that reality check is a good point for progress from here."
The talks began on Monday in an attempt to find agreement on the issues.
Mr Brown and Mr Cowen arrived in Belfast on Monday and held late-night discussions with both parties.
The leaders also held private talks on Tuesday morning before meeting the parties.
Talks between the DUP and Sinn Fein had intensified in recent weeks, before collapsing in acrimony last week.
If Sinn Fein were to decide Martin McGuinness should resign as deputy first minister, the joint nature of the roles of first and deputy first ministers would mean that DUP leader Peter Robinson would also be forced out of office, collapsing the executive.
Are you in Northern Ireland? Do you think the talks will succeed? Send us your comments.
The BBC may edit your comments and not all emails will be published. Your comments may be published on any BBC media worldwide.