South Sudan 'to withdraw troops' from Heglig oil field
South Sudan's President Salva Kiir has ordered the withdrawal of his troops from the Heglig oil field in Sudan.
But Sudan's leader Omar al-Bashir later said his forces had retaken Heglig town.
South Sudanese forces captured the area last week, accusing Khartoum of using it as a base to launch attacks.
UN chief Ban Ki-moon had described the occupation as illegal and also called on Sudan to stop bombing the South.
Mr Bashir on Friday told supporters at a victory rally in Khartoum: "We thank God that he made successful your sons; and the security forces and the police force and the defence forces - he has made them victorious on this Friday."
On state TV, his defence minister said Sudan's armed forces had entered Heglig 11:20 GMT.
South Sudan has so far made no public comments on Khartoum's claim.
The escalating fighting and rhetoric between the two sides over the past week has led to fears of all-out war.
Did they jump or were they pushed?
It may take a while to establish which version of events - Sudan's glorious victory or South Sudan's strategic withdrawal - is closest to the truth.
President Omar al-Bashir will certainly portray this as a triumph - and for him it is.
Even Sudanese who do not like him feel strongly Heglig is Sudanese, and regaining it will boost his popularity at a difficult economic time.
South Sudan has been able to push its point - that Heglig, or Panthou as the South Sudanese call it, belongs to it - to the world. But that message has fallen on deaf ears.
The US, AU and the UN all condemned South Sudan's takeover of the oilfields. On Thursday Ban Ki Moon called it 'illegal'.
Both countries have been energised by the fighting - and perhaps pushed closer to economic ruin.
The oil processing facility in Heglig may have been damaged, either by Sudanese air attacks or by the South Sudanese troops.
It is now even harder to imagine South Sudan re-exporting its oil through Sudan's infrastructure, so for the foreseeable future it will have to do without 98% of its revenue.
But the big question now is whether Heglig marks the high watermark of the fighting - or the start of a new war.
South Sudan seceded last July following a 2005 peace deal that ended a two-decade civil war in which more than 1.5 million people died.
On Thursday, South Sudan issued a statement saying it was not interested in war with its northern neighbour and that it would only withdraw from Heglig if the UN deployed monitors there.
President Bashir had earlier threatened to bring down the government in Juba following the loss of Heglig, which provided more than half of Sudan's oil.'LRA intelligence'
South Sudan ordered its withdrawal to create the environment for talks with Khartoum, Reuters news agency reports.
"An orderly withdrawal will commence immediately and shall be completed within three days," AFP news agency quotes a presidential statement as saying.
Mr Kiir said the South still believed that Heglig was a part of South Sudan and that its final status should be determined by international arbitration, Associated Press reported.
Heglig is internationally accepted to be part of Sudanese territory - although the precise border is yet to be demarcated.
The UK minister for Africa welcomed the news of the withdrawal and urged restraint on both sides.
"Sudan must also immediately cease all military action across the border, in particular bringing an end to aerial bombings of South Sudan's territory," Henry Bellingham said in a statement.
There have been intense diplomatic efforts to prevent a wider conflict - the latest involving the visit of US special envoy Princeton Lyman to Khartoum on Thursday.
The regional body Igad, which mediated the 2005 peace deal, expressed "grave concern about the escalating conflict" and said it would "extend all possible assistance to maintain peace and stability".
Uganda, a close ally of South Sudan, also indicated it might become involved if the fighting became a full-scale war.
Main disputes between Sudans
- Transit fees the South should pay Sudan to use its oil pipelines
- Demarcating the border
- Both sides claim Abyei
- The rights of each other's citizens now in a foreign country - there are estimated to be 500,000 southerners in Sudan and 80,000 Sudanese in the South
- Each accuses the other of supporting rebel groups on its territory
"We will not sit by and do nothing," Ugandan military chief Gen Aronda Nyakairima was quoted by Uganda's private Daily Monitor newspaper as saying.
A Ugandan army spokesman told the BBC that diplomacy would be exhausted before any military action was ever considered.
During Sudan's civil conflict, Uganda accused the Khartoum government of supporting the Lord's Resistance Army, which was fighting in northern Uganda.
Uganda backed the South Sudanese rebels during the civil war and now has extensive economic interests in the newly independent country.
The LRA, led by Joseph Kony, who has been the target of a recent online campaign highlighting his activities, now roam the jungles of Central African Republic, South Sudan and the Democratic Republic of Congo.
"We will be involved having suffered a proxy war by Khartoum," Gen Nyakairima told the Daily Monitor.
"Our people in northern Uganda suffered and intelligence information also indicates that the LRA, who have an estimated 200 guns, are again in contact with Khartoum," he said.
Both Sudan and the South are reliant on their oil revenues, which account for 98% of South Sudan's budget. But the two countries cannot agree how to divide the oil wealth of the former united state. Some 75% of the oil lies in the South but all the pipelines run north. It is feared that disputes over oil could lead the two neighbours to return to war.
Although they were united for many years, the two Sudans were always very different. The great divide is visible even from space, as this Nasa satellite image shows. The northern states are a blanket of desert, broken only by the fertile Nile corridor. South Sudan is covered by green swathes of grassland, swamps and tropical forest.
Sudan's arid north is mainly home to Arabic-speaking Muslims. But in South Sudan there is no dominant culture. The Dinkas and the Nuers are the largest of more than 200 ethnic groups, each with its own languages and traditional beliefs, alongside Christianity and Islam.
The health inequalities in Sudan are illustrated by infant mortality rates. In South Sudan, one in 10 children die before their first birthday. Whereas in the more developed northern states, such as Gezira and White Nile, half of those children would be expected to survive.
The gulf in water resources between north and south is stark. In Khartoum, River Nile, and Gezira states, two-thirds of people have access to piped drinking water and pit latrines. In the south, boreholes and unprotected wells are the main drinking sources. More than 80% of southerners have no toilet facilities whatsoever.
Throughout the two Sudans, access to primary school education is strongly linked to household earnings. In the poorest parts of the south, less than 1% of children finish primary school. Whereas in the wealthier north, up to 50% of children complete primary level education.
Conflict and poverty are the main causes of food insecurity in both countries. The residents of war-affected Darfur and South Sudan are still greatly dependent on food aid. Far more than in northern states, which tend to be wealthier, more urbanised and less reliant on agriculture.