(CNN) -- Sudan and South Sudan signed an agreement Friday to soon withdraw their respective military forces from a demilitarized border zone between the two African countries, officials from both nations said.