South Sudan's military says it has recaptured the oil hub of Bentiu - one of just two rebel-held cities.

Army spokesman Philip Aguer said the final resistance - a tank protecting a bridge to the city - had been overcome at 14:30 local time (11:30 GMT).

Rebel leader Riek Machar told AFP his forces had withdrawn to save civilians but vowed to fight on.

The UN peacekeeping chief says the conflict has killed "very substantially in excess" of 1,000 people.

Ceasefire talks in neighbouring Ethiopia have stalled.

Bentiu is the capital of the oil-rich Unity state. The fighting, which began on 15 December, has seen South Sudan's oil output fall by about 20%.

Col Aguer told Reuters news agency: "When you control Bentiu you control all the oil fields in Unity state."

Ahead of the government advance, thousands of people fled Bentiu.

Several thousand have sought refuge in a UN base in the city, where people have been divided according to their ethnic group in order to prevent clashes.

The conflict has seen outbreaks of ethnic violence between Dinkas, the community of President Salva Kiir, and Nuers, like Mr Machar.

Although both leaders have influential backers from the other's community, the conflict has often taken an ethnic dimension.

"We withdrew from Bentiu, but it was to avoid fighting in the streets and save civilian lives. We fight on, we will continue the battle," Mr Machar, the country's vice-president until last July, told the AFP news agency.

The BBC's Andrew Harding in the South Sudanese capital, Juba, says the question now is whether the recapture of Bentiu will spur on negotiators in Ethiopia to reach a ceasefire agreement to avoid further fighting.

Mr Machar said his anti-government alliance was still committed to peace talks.

Earlier, Col Aguer urged all civilians to leave Bentiu to avoid being caught in the crossfire.

He did not give any casualty figures but said that fighters on both sides had been killed.

The colonel told the Associated Press news agency that rebel forces had "destroyed'' the town, looting the bank, stealing food and setting the market on fire.

Medical aid group Medecins Sans Frontieres (MSF) said its facilities in Bentiu were looted on Thursday, putting its operations in the region in jeopardy.

"MSF won't be able to resume its much-needed operations in Bentiu until the security of our patients, staff and facilities is guaranteed," MSF South Sudan head Raphael Georgeu said in a statement.

UN envoy in South Sudan Toby Lanzer, earlier tweeted from Bentiu that UN peacekeepers had built up defences at the UN base to protect civilians.

Col Aguer said that from Friday afternoon, all the government forces would be focused on recapturing Bor - the other city under rebel control.

-BBC