UN leader Ban Ki-moon said Wednesday there are signs that unrest in South Sudan is spreading and demanded UN access to detainees held by the government.
Ban said the United Nations is still checking reports that hundreds of people have died in clashes between troops loyal to President Salva Kiir and former vice president Riek Machar.
UN officials say that up to 500 deaths have been reported since the fighting erupted Sunday.
"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," Ban told reporters.
He said there are now almost 20,000 people in two UN compounds in the capital Juba where food and water is reportedly running short.
But several hundred have also taken refuge at a compound in Jonglei state, Ban added.
Fighting has been reported in Jonglei's state capital Bor and in Torit, capital of Eastern Equatoria state, UN officials in South Sudan said.
Salva Kiir and Riek Machar are from rival ethnic groups and UN officials have raised concerns that the battle between the leaders could become a wider ethnical conflict.
Ban welcomed reports that Salva Kiir has offered talks to his opponent.
But the UN secretary general added: "It is essential to protect the human rights of all those who are detained. Mandated human rights monitors must have full access to visit the detainees. Security forces must operate in full compliance with international humanitarian law."
The United Nations has a major peacekeeping operation in South Sudan, the world's newest nation which became independent in 2011 after an acrimonious split with Sudan.