A Ugandan military spokesman says Ugandan troops will stay in South Sudan until the government of President Salva Kiir asks them to withdraw, contradicting a recent peace accord calling for them to leave.

Lt. Col. Paddy Ankunda said Tuesday that Ugandan troops in South Sudan are not preparing to pull out.

Under the terms of a peace deal signed last month between Kiir and rebel leader Riek Machar, all foreign troops are supposed to leave the country.

The presence of Ugandan troops in South Sudan is opposed by Machar, who says the foreign soldiers are an obstacle to peace.

Ugandan special forces were deployed to South Sudan in December 2013 at the request of Kiir, who alleged that soldiers loyal to Machar had tried to mount a coup.