The leaders of Sudan and South Sudan reached a border security deal on Wednesday that will restart badly needed oil exports, but failed to solve the other main conflicts left over when Africa's largest country split last year.
The deal, reached after more than three weeks of negotiations, will throw both economies a lifeline. It should for now prevent any resumption of the kind of fighting that broke out along the border in April - the worst violence since South Sudan seceded in July 2011 under an agreement that ended decades of civil war.
But the neighbours still deeply distrust each other and have a history of failing to implement agreements.
Faced with the threat of U.N. sanctions and economic collapse, Sudanese President Omar Hassan al-Bashir and his South Sudanese counterpart Salva Kiir agreed after four days of summit talks to set up a demilitarised border buffer zone.
The deal will allow landlocked South Sudan to resume oil exports through Sudan, providing both battered economies with dollars. The south had shut down its entire 350,000 barrels a day of output in January after the countries argued about transit fees.
"The agreement will be signed tomorrow," El-Obeid Morawah, spokesman for Sudan's Foreign Ministry, told Reuters. Atif Keir, spokesman for the southern delegation, confirmed the deal.
But despite pressure from the African Union, the United States and other Western powers, the two sides failed to settle the fate of at least five disputed oil-producing regions along the border.
Tensions over the unmarked 1,800-km common border spilled over into fighting in April, when South Sudan's army briefly occupied the Heglig oilfield, vital to Sudan's economy.
"We will talk about the claimed areas in future talks," Morawah said.