Fugitive former South Sudanese vice-president Riek Machar has denied government allegations that he tried to stage a coup at the weekend.
In a BBC interview, he denied any link with fighting that began on Sunday and accused President Salva Kiir of "inciting tribal and ethnic violence".
The UN says hundreds have died and has warned of a descent into civil war.
Mr Kiir's government said its forces were in control of all cities, but he has offered to talk to Mr Machar.
'Hunting me down'
Mr Kiir said a group of soldiers supporting Mr Machar had tried to take power by force on Sunday night but were defeated.
He said the clashes began when uniformed personnel opened fire at a meeting of the governing party, the Sudan People's Liberation Movement (SPLM).
But Mr Machar told the BBC World Service's Newsday programme on Wednesday: "There was no attempted coup."
The whereabouts of Mr Machar are unclear. He told the BBC he was still in South Sudan and was "not going to leave the country".
He blamed Sunday's fighting on a conflict between members of the presidential guard, and said it spread across parts of the capital, Juba.
He added that government troops used the incident to arrest some of his supporters on Monday, and that he himself escaped.
"Salva wanted to frame me," he said. "I had to flee. They are hunting me down."
Mr Machar said his disagreement with Mr Kiir was on reform of the SPLM, which the president had rejected.
"So we are asking him to resign and leave the presidency," Mr Machar said.
Mr Kiir said he was willing to enter into talks with Mr Machar but said he did not know what the result would be.
UN Secretary General Ban Ki-moon on Wednesday welcomed the offer, saying he was "deeply concerned" about the situation in the country.
He said that this was "a political crisis that needs to be dealt with through political dialogue" and that there was a risk of the violence spreading further.
Mr Ban confirmed that some 20,000 people had taken refuge in the UN mission in Juba, and several hundred more in Jonglei state.
French UN ambassador Gerard Araud, who holds the rotating presidency of the Security Council, said the conflict had "the potential of a civil war" between the two main ethnic bodies, the Dinka - Mr Kiir's group - and the Nuer, from which Mr Machar hails.
Information Minister Micheal Makuei Lueth confirmed to the Associated Press that at least 500 people, mostly soldiers, had been killed.
There were reports that fighting had continued on Monday and Tuesday near the presidential palace and many other areas of Juba.
On Wednesday a businessman living in Juba, Muhammad Waqas ur-Rehman, told the BBC the city was tense and that he and many others were trying to leave.
There were also reports of people fleeing clashes in Bor, the capital of Jonglei state, about 150km (90 miles) to the north.
The South Sudan Red Cross Society said at least 19 people were killed in overnight fighting there.
However, presidential spokesman Ateny Wek Ateny told the BBC that government forces were in full control of Juba and all other cities, and that there were no major engagements.
Mr Ateny played down the prospect of civil war and said that while it was likely that civilians had been caught in the fighting, no-one was "targeting ethnic groups".
BBC world affairs correspondent Mike Wooldridge says it remains to be seen what impact such government assurances will have in what has been a tense and volatile situation.
The UK's Foreign Office said it was pulling some of its embassy staff out of Juba "due to the current instability".
It said the embassy remained open but that it now advised "against all travel to Jonglei state and Juba".
The US has suspended embassy operations and on Wednesday flew out 120 evacuees, including 28 foreign diplomats, on two C-130 aircraft.
On Tuesday, the South Sudan government said former Finance Minister Kosti Manibe, former Justice Minister John Luk Jok and former Interior Minister Gier Chuang Aluong were among 10 opposition figures who had been arrested.
Many were members of the cabinet that was sacked in its entirety in July.
South Sudan has struggled to achieve a stable government since becoming independent from Sudan in 2011.
The independence referendum was intended to end a decade-long conflict, led by the SPLM, against the north. But the oil-rich country remains ethnically and politically divided, with many armed groups active.
After a peace deal was signed in 2005, the southern rebel group appointed Mr Machar as vice-president of the South Sudan regional government, a position he retained after independence in 2011 until he was dropped in July.