Juba - South Sudan rebel chief Riek Machar has promised to attend peace talks, UN chief Ban Ki-moon announced on Tuesday as he pushed efforts to end a brutal civil war he said "enrages my soul".
The UN secretary general flew into South Sudan as fighting raged between warring parties in defiance of international pressure and despite dire warnings of genocide and famine in the nearly five-month-old conflict.
The visit, which comes as rebels and government forces battle for control of a key oil town, is the latest major drive for a ceasefire in a war that has seen the world's youngest nation collapse amid a brutal cycle of war crimes.
"The conflict destroying this fragile young country is senseless," Ban said, warning that if fighting continues one million people could soon face famine.
Both sides in the conflict have been accused of widespread ethnic massacres, rape and recruitment of thousands of child soldiers.
"What I have seen and heard today breaks my heart and enrages my soul," Ban told reporters, as he wrapped up his one-day visit, where he met President Salva Kiir as well as some of the tens of thousands sheltering inside hugely overcrowded fortified UN peacekeeper bases.
They are too frightened of attacks to leave the protection of the peacekeepers, even though the camps themselves have come under attack and conditions are dire with flooding and little shelter from alternating baking heat and torrential rains.
Ban's visit comes days after US Secretary of State John Kerry flew into the capital, a visit in which he extracted promises from Kiir to meet face-to-face with rebel chief Machar, a former vice-president.
Ban said on Tuesday that Machar had promised he "will be present" at talks in the Ethiopian capital.
Ban said the meeting had been tentatively scheduled for Friday, although the date may be pushed back as Machar has said it will take time for him to travel to the venue.Major offensive
But despite US warnings of sanctions if fighting continued, the government has pushed forward a major offensive to claw back towns from the gunmen, capturing a rebel stronghold and forcing Machar to flee into the bush.
"Leaders must close the wound they have opened, they must support justice and accountability for crimes committed, and they must address the root causes of the conflict," Ban added.
Kerry has since warned of "serious implications" unless the fighting stops.
Ban last visited South Sudan amid euphoric celebrations at its independence from Sudan in July 2011, after it voted to split away following decades of war with Khartoum.
But as he arrived on Tuesday, battles raged around the dusty northern town of Bentiu, ramshackle capital of the oil-producing Unity state, four days after government troops moved to wrest back control.
Defence Minister Kuol Manyang told AFP government troops were in control of the town centre, but that heavy fighting was ongoing in surrounding villages.
Forces include both mutinous troops as well as ragtag forces, including a fearsome militia called the White Army, after the ash they daub on their bodies, both to ward off mosquitoes and as war paint.
The war has claimed thousands - and possibly tens of thousands - of lives, with over 1.2 million people forced to flee their homes.
Almost five million people are in need of aid, according to the UN.
A January ceasefire was never enforced. Stop-start peace talks in Ethiopia have yet to forge agreement on even the basic agenda.
Aid agencies are warning that South Sudan is now on the brink of Africa's worst famine since the 1980s, while both Kerry and the UN human rights chiefs have spoken out over their fears that the country could slide towards a genocide.
Although starting as a personal rivalry between Kiir and Machar, the conflict has seen armies divide along ethnic lines and fighting pitting members of Kiir's Dinka tribe against Machar's Nuer.
The conflict erupted on 15 December with Kiir accusing Machar of attempting a coup.
Machar then fled to the bush to launch a rebellion, insisting that the president had attempted to carry out a bloody purge of his rivals.