US President Barack Obama has warned South Sudan that Washington and its allies would cut aid to the country over any attempted military coup, amid growing fears of civil war.

Obama also urged South Sudan's leaders to help protect US personnel and citizens in the conflict-ravaged country, after four US military service members were wounded when their aircraft were fired upon on Saturday during a mission to evacuate American citizens.

"Any effort to seize power through the use of military force will result in the end of longstanding support from the United States and the international community," the White House said in a statement following Obama's call with National Security Adviser Susan Rice and other top aides.

Violence is escalating in South Sudan, which gained independence from Sudan in 2011, despite an offer from President Salva Kiir to open talks with his former deputy, Riek Machar, whom Kiir accuses of having started the fighting last week by attempting a coup.

Machar denies a coup plot and in turn accuses Kiir of conducting a violent purge over the past week. His loyalists are now fighting the central government on several fronts.

Civilians fleeing

At least 500 people have been killed in the capital Juba alone in six days of fighting. Tens of thousands have been displaced, many seeking shelter at UN bases amid warnings that the impoverished nation was on the brink of all-out

civil war.

Juba's main bus park was crowded with people struggling to find space on public transport on Saturday, while foreigners have headed to the airport where several countries - including the US and Britain - have sent military transport planes for evacuations.

Fighting has spread to Bor, which lies about 200km north of Juba and has been seized by rebels.

South Sudan's army spokesman said an operation was under way to retake the town.

"There is fighting, but we are supported by air units," Philip Aguer, spokesman for the Sudan People's Liberation Army (SPLA), told the AFP news agency.

Aguer said that in northern oil-producing Unity State, a key commander - Major General James Koang Choul - appeared to have defected to Machar's side.

"We have lost contact with the commander... and there are reports he has joined the forces of Riek Machar," Aguer said while insisting that government forces were still in control of the area - something the rebels contest.