Updated

The U.N. Security Council unanimously approved a resolution Wednesday threatening non-military sanctions against Sudan and South Sudan if they don't halt escalating violence on their border and return to negotiations.

China, a major oil buyer from both countries, and Russia traditionally oppose sanctions but voted in favor of the U.S.-drafted resolution after a minor change to the text -- a reflection of growing international alarm at the crisis.

China is "always cautious about the use of sanctions" but voted in favor of the resolution, stressing that Beijing is "deeply worried" about deterioration in relations between the two countries," China's U.N. Ambassador Li Baodong said.

The resolution endorses an African Union roadmap aimed at getting the two countries to step back from the brink of war and resolve their differences.

Li stressed that international community should "refrain from interfering in the mediation efforts of the AU and other regional countries."

"China has all along maintained that the international community should take an objective, impartial and balanced position on Sudan," he said.

The resolution condemns repeated cross-border violence between the two sides, including troop movements, the South's seizure of the oil-rich town of Heglig, and Sudan's aerial bombings in the South. There has been talk in both countries of trying to get rid of the other's leaders and the resolution also condemns "actions by any armed group aimed at the forced overthrow of the government of either Sudan or South Sudan."

South Sudan won independence from Sudan last year as part of a 2005 peace treaty that ended decades of war that killed 2 million people. But the neighboring countries have been drawing closer to all-out war in recent weeks over the unresolved issues of oil revenues and their disputed border, sparking alarm and condemnation from the international community.

U.S. Ambassador Susan Rice said the conflict "is on the verge of becoming a full-scale and sustained war," and warned that "both countries are on the brink of returning to the horrors of the past and taking the entire region with them."

She welcomed the council's "strong and unanimous" support for the AU's roadmap for peace, saying "this is ultimately the only way that further conflict can be avoided," and she urged both countries to immediately stop the violence.

The Security Council approved nonbinding presidential statements in March and April with support from all 15 members expressing increasing alarm at the escalating conflict between the neighboring countries.

But the resolution adopted Wednesday is legally binding and goes further, declaring that "the prevailing situation along the border between Sudan and South Sudan constitutes a serious threat to international peace and security."

Acting under Chapter 7 of the U.N. Charter, which deals with such threats, it orders Sudan and South Sudan to immediately stop all hostilities including aerial bombings within 48 hours of the adoption of the resolution. Both countries then have to "unconditionally withdraw" all forces to their side of the border, stop harboring rebel groups, and resume negotiations under the AU within two weeks -- by May 16.

The resolution calls for negotiations to be concluded within three months -- by Aug. 2 -- on critical issues including arrangements on oil and payments, the status of nationals living in the other country, resolution of disputed border areas, demarcation of the border, and agreement on the final status of oil-rich Abyei, an outstanding issue from the 2005 peace agreement.

If these negotiations fail to achieve agreement on any issues within three months, the resolution asks U.N. Secretary-General Ban Ki-moon, in consultation with the AU, to make detailed proposals on all outstanding issues within the following month.

The Security Council expressed its intention "to take appropriate additional measures" under Article 41 of the Charter, which authorizes non-military sanctions such as asset freezes and travel bans, if Sudan or South Sudan fail to comply with the AU roadmap and the resolution's provisions.