TWO YEARS ago, the newborn nation of South Sudan represented a rare foreign policy triumph for President Obama, largely because of the president’s decision to lead from the front. When an accord laying out a path for Sudan’s largely Christian south to separate from the Muslim Arab dictatorship based in Khartoum threatened to unravel, Mr. Obama appointed two special envoys, attended a United Nations meeting on Sudan and dispatched then-Sen. John F. Kerry to lay out a detailed “road map” for Sudanese leaders. The result was a successful referendum and the July 2011 birth of a new nation of 8 million people.

Now that achievement is in danger of crumbling, thanks to the wretched behavior of South Sudan’s leaders. Rather than use the country’s abundant oil revenue to build up one of the world’s most undeveloped territories, President Salva Kiir tolerated corruption, engaged in proxy wars with Sudan in disputed territories and feuded with his vice president, Riek Machar. On Dec. 15 Mr. Kiir accused Mr. Machar of attempting a coup, arrested 11 senior officials and tried to disarm members of the presidential guard belonging to Mr. Machar’s Nuer ethnic group. This touched off fighting across the country between supporters of the two leaders, largely divided along ethnic lines. Mr. Kiir is from the majority Dinka group.

On Tuesday, the two leaders, under pressure from African leaders and the Obama administration, agreed to begin negotiations. But the fighting continued: A Nuer “White Army,” believed to be under the control of Mr. Machar, was said to have captured most of Bor, a town that has changed hands three times in the fighting. Thousands are believed to have been killed, and the United Nations says 180,000 have been displaced in just two weeks.

To its credit, the Obama administration again has been actively trying to broker a solution. A new envoy, Donald Booth, had met with Mr. Kiir four times in eight days as of Tuesday, and he has been on the phone with Mr. Machar. The United States has considerable leverage, having supplied South Sudan with hundreds of millions of dollars in aid. Just as influential are Ethiopia and Kenya, whose presidents have pushed for negotiations. But Uganda’s leader, Yoweri Museveni, has tilted toward Mr. Kiir, a longtime ally. On Monday he threatened to “go after” Mr. Machar if he did not agree to a cease-fire.

In fact, foreign intervention in the fighting might make the conflict worse. What’s really needed is pressure on both leaders to pull back their forces and begin negotiations on a more lasting political settlement. They should agree to contest South Sudan’s leadership in elections scheduled for 2015, not on the battlefield. In the absence of such a compromise, South Sudan could slip into an unrestrained ethnic conflict. As nations new and old can attest, such bloodshed can take on a life of its own.