Sudan and South Sudan have reached a deal on border security and oil production that will let oil exports from South Sudan through Sudan to resume, spokesmen for both sides said Wednesday night. The leaders of the neighboring countries made the partial breakthrough after four days of talks in the Ethiopian capital, Addis Ababa, the BBC reported. "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. President Omar al-Bashir of Sudan and President Salva Kiir of South Sudan are to sign the deal Thursday morning. Negotiators for both sides said a demilitarized buffer zone between the two countries had been agreed. Still, several issues remain unresolved, including Abyei and other disputed border regions. "We will talk about the claimed areas in future talks," Morawah said. The neighbors were also unable to reach a solution for Abyei, which has symbolic significance to both and is rich in grazing lands. Plans for a referendum have failed over the question of who should participate. "The African Union will decide on a final solution," Keir said. The two countries were pushed to the brink of war earlier this year, a year after the south gained independence. After fighting over oil facilities and disputed land broke out, the United Nations threatened both sides with sanctions if they did not reach a comprehensive agreement.