By Aaron Maasho
ADDIS ABABA (Reuters) - Sudan said on Saturday it had reached a deal with South Sudan on oil transit fees, a first step towards ending a dispute which had brought the hostile neighbors close to war, but also said it wanted a border security agreement before oil flows resumed.
The shareout of oil revenues was one of the biggest issues left unresolved when South Sudan became independent in July last year, under a 2005 agreement that ended decades of civil war, and fighting along the ill-defined border pushed them close to war in April.
U.S. Secretary of State Hillary Clinton said the oil agreement showed a "new spirit of compromise on both sides," and U.S. President Barack Obama said Sudan and South Sudan should build on the momentum to resolve their remaining border and security issues.
"This agreement opens the door to a future of greater prosperity for the people of both countries," he said in a statement released by the White House.
The two sides, deeply mistrustful of each other, have often not implemented previous agreements and still need to mark their 1,800-km (1,200-mile) border and resolve charges both have made of supporting rebels in the other's territory.
The U.N. Security Council had given the two states until Thursday to resolve all conflicts left over from South Sudan's secession, taking with it the bulk of former Sudan's oil reserves.
Landlocked South Sudan threw both economies into turmoil when it shut down its output of 350,000 barrels a day in January after Sudan started seizing oil going through its pipelines to make up for what it called unpaid transit fees.
African Union mediator Thabo Mbeki said the neighbors would now start talks to get southern oil exports moving.
"It's an (oil) agreement about all of the matters. The issues that were outstanding were charges for transportation, for processing, transit," Mbeki, the former South African president, told reporters.
"Steps will be taken to get companies to begin the process of resuming oil exports from South Sudan," he said.
Mbeki gave no financial details of the deal, but South Sudan's delegation said Juba would pay a weighted average of under $10 per barrel. It has also offered a $3.2 billion package to compensate Sudan for the loss of most of its oil reserves to the South. It had previously offered $2.6 billion.
Sudan itself lowered its transit fee demand to around $22 a barrel, from an initial $36, according to a position paper published by SUNA. It also wants compensation of $3.02 billion, among other demands, Suna added.
"The parties understand very well that it would be important that by the time this oil starts flowing again, the necessary security arrangements should be in place," Mbeki said.
Sudan said the oil deal would be implemented only after a security arrangement had been reached, after the Muslim fasting month of Ramadan ended at the end of August, the state news agency SUNA reported.
"Both sided reached understandings regarding oil which are considered acceptable..." Sudanese delegation spokesman Mutrif Siddig told SUNA. "Its implementation will start after understandings on security issues," he said.
Oil industry sources have said restarting oil production could take six months or longer as the pipelines have been filled with water to avoid gelling and some wells were not closed properly.
The African Union-mediated talks, led by Mbeki, have long been hampered by differences on where to draw a demilitarized buffer zone, seen as a crucial first step to ending hostilities.
The South's top negotiator, Pagan Amum, reiterated calls for an arbitration body to resolve a dispute over the position of their shared border, a potentially lengthy process.
He also accused Khartoum of maintaining a police force in the disputed Abyei border region, despite U.N. requests for a complete pullout by both sides.
Mbeki said Sudanese President Omar Hassan al-Bashir and his southern counterpart Salva Kiir were due to discuss Abyei next month, after a break for Ramadan.
"We have informed them (AU) that there has been an agreement between the parties that the matter of the final status of Abyei will be addressed at the next summit meeting of the presidents (Bashir and Kiir)," he said.
Abyei was meant to have a referendum like the South under the 2005 peace agreement, but the two sides have been unable to agree on who should participate.
(Additional reporting by Laura MacInnis in Washington; Writing by Ulf Laessing and Aaron Maasho; Editing by Tim Pearce and Sandra Maler)
Terrific: Attorney In Charge of Releasing Lois Lerner "Lost" Emails Now In Charge of Hillary Clinton's Emails | Katie Pavlich