South Sudan's president said on Wednesday he was ready for dialogue with his rival who he has accused of trying to force him out of power through fighting that has killed up to 500 people and brought the two-year-old nation close to civil war.

Clashes that erupted in Juba late on Sunday spread on Wednesday to the flashpoint town of Bor, north of the capital and scene of an ethnic massacre in 1991 that has raised fears of a slide back into conflict between clans.

President Salva Kiir, a member of the dominant Dinka, has blamed the clashes on his former vice-president Riek Machar, a Nuer. But in a news conference, Kiir said he was ready for dialogue with the man he sacked in July.

"He was asked whether he would accept any dialogue, and he said he is ready for dialogue," presidential spokesman Ateny Wek Ateny told Reuters by telephone, adding that Kiir had also said there was no current discussion.

South Sudan Violence

Civilians arrive at a UN compound adjacent to Juba International Airport to take refuge as violence spreads across South Sudan. (The Associated Press)

Machar told the online Sudan Tribune he was not behind any coup attempt and denied having any role in the fighting, saying Kiir was using clashes that erupted between members of the presidential guard to punish political rivals.

Political tensions have been mounting since Machar's dismissal. He has said he would run for president and has accused Kiir of being dictatorial.

Kiir said before the clashes that his rivals were reviving rifts that provoked infighting in the 1990s.

He has faced mounting public criticism for doing little to improve life in one of Africa's poorest nations.

"The two main ethnic groups the Dinka and the Nuer could go into a full-fledged civil war in the country," Gerard Araud, France's ambassador to the United Nations and current president of the Security Council, told the BBC, calling for dialogue.

Those sentiments were echoed by UN Secretary General Ban Ki-moon who said the violence could spread to other parts of the country.

"This is a political crisis, and urgently needs to be dealt with through political dialogue. There is a risk of this violence spreading to other states, and we have already seen some signs of this," he said in a statement to the media Wednesday.

'It will impact a lot of countries, and they are not beacons of stability.' - Western diplomat

Juba was quiet after sporadic overnight gunfire but UN officials also reported fighting in Torit, east of Juba.

The United Nations said the clashes have driven 20,000 people to its camps for refuge.

The president sacked Machar in July and political tensions have simmered since then in the oil-producing nation, which declared independence from Sudan in 2011. Until now, fighting has appeared to stay away from the oilfields.

The government said it had arrested 10 people, including seven former ministers, over the "foiled coup" and wanted to question several others, including Machar.

In Bor, where Nuer soldiers loyal to Machar massacred hundreds of Dinka in 1991, locals feared the fighting could spill beyond two nearby barracks, where clashes flared.

Raising the stakes

A broader conflict could threaten vital aid and be exploited by neighbouring Sudan, which has had persistent rows with Juba over their undefined borders, oil and security. That would further hurt efforts to build a functioning state in the south.

"Last night there was fighting in two military barracks," Hussein Maar, deputy governor of Jonglei state, told Reuters, although he said the town of Bor was calm.

A journalist in Bor told Reuters troops led by Peter Gadet, a Machar ally, took control of the two bases from Dinka soldiers. But details were sketchy and, according to another account, only one base was in the hands of Machar's allies.

France's Araud said there were 7,000 to 8,000 UN peacekeepers in South Sudan, but added: "It is clear our soldiers will not intervene in the conflict."

A Western diplomat said the expanded fighting was tipping the nation into an ethnic conflict that was "difficult to roll back," adding Kiir had raised the stakes by calling it a coup.

"It will impact a lot of countries, and they are not beacons of stability," he said of the region around South Sudan.

Uganda temporarily shut its border. Kenya said its border was open, and aid agencies said a refugee camp nearby were braced for new arrivals. Kenya, like other neighbours, hosted Sudanese refugees during former Sudan's long north-south war.

In Juba, traffic returned to the streets and the airport reopened, amid a tense calm in the capital of a nation the size of France with 11 million people but barely any tarmac roads.

The U.S. State Department said it was organizing evacuation flights and Britain said it was flying out some embassy staff and gathering names of other Britons who wanted to leave. Many aid workers live and work in Juba.

Diplomats said the UN had reports of between 400 and 500 people killed and up to 800 wounded in the nation that declared independence in 2011 from Sudan, after decades of war.

"Most people are scared they might be confronted with a mob or see dead bodies," said one aid worker in Juba, adding that the city was calmer on Wednesday morning, after residents awoke to heavy gunfire and artillery blasts on Monday and Tuesday.

A group of East African foreign ministers will travel to South Sudan on Thursday to seek an end to days of fighting, the first foreign mission to enter the country since the eruption of the conflict. 

"We will travel to Juba tomorrow to gain first-hand knowledge of the situation on the ground, and discuss ways to seek a political settlement to the crisis," Ethiopian Foreign Affairs Minister Tedros Adhanom told Reuters.

"This is our neighbourhood and we are hopeful that this situation will be solved amicably."

The ministers will travel under the umbrella of the East African trade bloc the Intergovernmental Authority on 
Development.