Mr Obama also met the presidents of Uganda, Kenya and Ethiopia, the African Union chairman and the Sudanese foreign minister who have led South Sudan peace talks in Addis.
Sudan, from whom South Sudan won independence in 2011, is thought to be arming the rebels while Uganda has been backing the government and protecting the fledgling country’s airport.
Mr Obama’s intervention came after a UN report last month claimed South Sudanese government troops had engaged in a campaign of violence that included raping women and burning them alive in their homes, castrating children and slitting their throats and forcing those suspected of knowledge about the rebels to squeeze hot coals in their hands. Rebel groups are accused of similar atrocities.
A US official suggested that if the two sides cannot agree to a deal, a “Plan B” will be floated which could include an arms embargo and sanctions on individuals’ assets and travel.
He indicated that during his meeting Mr Obama would try to encourage Yoweri Museveni, Uganda’s president, to use its influence to nudge Mr Kiir towards a deal.
Discussions are also underway to set up a special tribunal for South Sudan to try those accused of atrocities. The African Union suggested last week it could even send troops if a ceasefire agreement is not reached soon.
John Prendergast, founder of the African advocacy and research group the Enough Project, said the strongest incentive for the two rivals to put down their arms was financial.
“The leaders of the two sides fight on in the belief that there will be no personal consequence, and outside actors collaborate in the destruction of this embryonic state through their military support and collusion in vast corruption, both past and present,” he said.
During the press conference, Mr Obama also vowed to deep economic and security ties with Ethiopia, which is a lead contributor to the African Union force fighting al-Shabaab in Somalia.
But he insisted that increased engagement with Ethiopia, which has a rapidly growing economy and is Africa’s second most populous nation but also one of its most repressive, did not mean he would “bite his lip” about human rights violations.
“I think the prime minister is the first to admit there is still more to do,” he said. “Nobody questions our need to engage with large countries where we may have differences on these issues. We don’t advance or improve these issues by staying away.”
Mr Desalegn, who released five of at least 12 journalists for security offences shortly before Mr Obama’s visit, promised that his commitment to democracy was “real, not skin deep”.
But human rights groups disagree, and criticised Mr Obama for engaging with Ethiopia.
Reprieve, which is campaigning for the release of opposition politician Andy Tsege, who lived in exile in London but is now facing the death penaltyin an Ethiopian jail, said Mr Obama’s assertion that the country was a democracy was “woefully misplaced”.
“If the president is serious about promoting freedom and good governance in Ethiopia, he must tell the government to release its peaceful critics, like Andy, without delay,” said spokesman Maya Foa.