South Sudan and Sudan have agreed to resume pumping oil after a bitter dispute over fees which saw production shut down more than a year ago.
The South, which seceded from the rest of Sudan in 2011, will begin oil production again by 24 March, under the deal negotiated in Ethiopia.
Both states rely heavily on oil, which is pumped from the South through Sudan's pipelines for export.
They also agreed to withdraw troops from their border area.
A demilitarised buffer zone is to be set up, with the intention of improving security. Trade deals and a committee to agree on the disputed border were also discussed in the Ethiopian capital, Addis Ababa.
However it is the commitment to get the oil flowing again which will attract the most attention, says the BBC's former Khartoum correspondent, James Copnall.
South Sudan's government used to earn 98% of its revenues from oil and its economy has collapsed since it shut down oil production, with vital development work put on hold, our correspondent says.
Sudan has been suffering too - the IMF predicted that its economy would shrink by 11% in 2012 because of the loss of oil revenue following the South's secession.
The worsening economic situation in Sudan has led to street protests, although the activists who hoped for a "Sudanese summer" to follow the "Arab Spring" have so far been disappointed, our correspondent says.
If this timetable is respected, Sudan's economy should benefit from billions of dollars coming from oil transit fees, and from a compensatory payment for allowing the South to secede, he says.
But he notes that the timetable would not be necessary if both countries had implemented the agreements on all these matters they signed in September. As a result many people in both Sudans will wait for the oil to start flowing before they raise their hopes too much.
Asked when the orders would be given to resume oil flows, former South African President Thabo Mbeki, who was mediating between the two sides, told reporters: "The instruction to the companies is D-day [10 March plus 14]."
Asked why a deal to implement the September agreements had been reached now, South Sudanese Information Minister Barnaba Marial Benjamin told the BBC's Newsday programme it was thanks to the negotiating efforts of Mr Mbeki and the African Union.
"The need for peace between the two countries is something they require in order to live side by side," he said.
An estimated 75% of all the former Sudan's oil reserves are in South Sudan but the refineries and pipeline to the Red Sea are in Sudan.
In January 2012, disagreement on sharing oil revenues led South Sudan to halt its 350,000 barrel-per-day output, and halve public spending on everything but salaries.
Ten border crossing points, vital to local traders, will open within a week under the agreement, AFP news agency reports.
Both states said they would withdraw troops from contested border areas.
South Sudan's army spokesman, Philip Aguer, said soldiers would take around two weeks to withdraw southwards.
Troops must "start moving to the designated areas, 10km [six miles] away from the buffer zone," Mr Aguer told reporters.
Sudan's Defence Minister, Abdelrahim Mohammed Hussein, said his forces were committed to a timetable signed under Mr Mbeki's mediation on Friday.
Troops, he said, began withdrawing from the buffer zone on Sunday.
South Sudan gained independence from Sudan on 9 July 2011 as the outcome of a 2005 peace deal that ended Africa's longest-running civil war.
About 1.5 million people are thought to have lost their lives in the conflict.