At least 500 people, most of them soldiers, have been killed in South Sudan since Sunday, a senior government official said as an ethnic rivalry threatened to tear apart the world's newest country.

Some of the victims "were shot in the bushes" around Juba, the capital, Information Minister Micheal Makuei Lueth told The Associated Press on Wednesday, citing a report from the minister of defence.

He said up to 700 others had been wounded.

The violence has forced about 20,000 people to seek refuge at UN facilities in Juba since Sunday.

The clashes apparently are pitting soldiers from the majority Dinka tribe of President Salva Kiir against those from ousted Vice-President Riek Machar's Nuer ethnic group, raising concerns the violence could degenerate into civil war.

Tensions have been mounting in South Sudan since Kiir fired Machar as his deputy in July. Machar has said he will contest the presidency in 2015.

Kiir told a press conference in Juba late Wednesday that he was willing to enter talks with Machar, his political rival who he fired earlier this year amid a power struggle within the ruling party.

"I will sit down with him so that we talk, but I cannot tell what the outcome of such talks would be," he said.

UN chief Ban Ki-moon told reporters Wednesday that South Sudan was experiencing a political crisis that "urgently needs to be dealt with through political dialogue." Ban said he urged Kiir "to resume dialogue with the political opposition."

South Sudan has been plagued by ethnic violence since it peacefully broke away from Sudan in 2011 after decades of civil war.

Machar is now the subject of a manhunt by the country's military after he was identified by Kiir as the leader of an alleged coup attempt on Sunday. Machar has denied he was behind any coup attempt.

The fighting began Sunday in the capital but the city was mostly calm Wednesday.

South Sudanese military spokesman Col. Philip Aguer told the AP there was fighting early Wednesday among troops in Jonglei, the largest state in South Sudan, and he was trying to confirm reports there of desertions from the military.

"We don't know who is fighting who," he admitted.

At least 19 civilians have been killed in violence in Bor, the capital of Jonglei, said Martin Nesirky, a spokesman for the UN secretary-general's office, citing figures from the South Sudan Red Cross.

He said tensions were also on the rise in the states of Unity and Upper Nile.

Casie Copeland, the South Sudan analyst for the International Crisis Group who is in Juba, said key Nuer leaders in the army were defecting in Jonglei but that "events that led to Sunday's fighting remain unclear."

Toby Lanzer, the UN's humanitarian co-ordinator in South Sudan, said in a Twitter post that thousands of civilians in Jonglei had sought refuge at a UN facility there.

A dusk-to-dawn curfew was in place in Juba and an AP reporter saw a heavy police and army presence on its streets.

On Tuesday the United States ordered its citizens to leave South Sudan immediately. The U.S. diplomatic mission in Juba said on Twitter that an evacuation flight was full Wednesday and it would advise if there was another flight Thursday.

In a BBC interview Wednesday, Machar denied any link with the current fighting and blamed it on a conflict between members of the presidential guard. He added that government troops used the incident to arrest some of his supporters Monday and that he himself escaped.

"Someone wanted to frame me," he said. "I had to flee. They are hunting me down."

Foreign Minister Barnaba Marial Benjamin, however, insisted that Machar had orchestrated the violence in a bid to take power.

"If he wants to become president, he needs to wait for elections," Benjamin said.

At least 10 political leaders have been arrested over their roles in the alleged coup, the government said.