Sudan and South Sudan have reached a deal to restart oil production after a dispute over taxes.
The South shut down its output in January after failing to agree on fees charged by Sudan to transport oil through its territory.
But water in the pipelines could delay the restart.
South Sudanese President Salva Kiir received a visit from US Secretary of State Hillary Clinton who urged both sides to reach a deal to resume exports through the north.
The agreement was announced by African Union mediator Thabo Mbeki, the former South African president, who said all outstanding issues had been resolved.
But key border security problems still need to be addressed to end hostilities, he said.
Sudan’s President al-Bashir accepted the south’s breakaway in 2011 but the disputes have continued.
Earlier this year the two sides came close to war after South Sudanese troops briefly occupied the oil-rich border area of Heglig.
The skirmishes saw tankers seized and oil wells shut down.
Both countries’ economies have been damaged by the standoff over production.
Sudan lost about three quarters of its oil when the South gained independence last year.