Updated

Sudan on Thursday endorsed the African Union's roadmap to avert an all-out war with South Sudan, though it insisted on retaining the right to self-defense.

Based on the seven-point roadmap, the two countries have until next Tuesday to restart stalled negotiations and three months to reach an agreement. The AU is trying to get the two sides to again negotiate the countries' shared border, citizenship matters and oil revenue sharing.

On Wednesday, the U.N. Security Council unanimously approved a resolution threatening nonmilitary sanctions against Sudan and South Sudan if they don't halt escalating violence and return to negotiations.

The Sudanese Foreign Ministry issued a statement Thursday accepting the AU plan as well as the U.N. resolution. But with its reference to self-defense, the Sudanese statement also implied possible continued conflict.

The statement said Sudan wished the other side would fully commit to stopping hostilities and would withdraw its troops from disputed areas so that Sudan could do the same.