Uganda promised to halt military cooperation with old ally North Korea after a visit to Kampala by South Korean President Park Geun-Hye on Sunday.
North Korea, which is under UN sanctions for its defiant efforts to build nuclear weapons, has for many years sent military trainers to Uganda, but Uganda's foreign minister Sam Kutesa said the relationship would now end.
"We are disengaging the cooperation we have with North Korea as a result of UN sanctions," Kutesa said.
"Our policy is that we do not support nuclear proliferation."
The about-turn followed a meeting between Uganda's President Yoweri Museveni and his South Korean counterpart Park Geun-Hye.
"President Museveni said Uganda would enforce the UN Security Council resolutions, adding that the government had already been given orders to disengage with North Korea on police and other military engagements," Uganda's State House said in a statement late Sunday.
Earlier in the day, a Ugandan government spokesman had denied severing ties with North Korea, calling the reports "propaganda". However, officials later backtracked.
Uganda has been one of North Korea's allies in Africa with diplomatic relations since 1963. Beginning in 2007, North Korea has run training programmes for Uganda's army and police.
Museveni, who has led his country since 1986 and was re-elected in February for a fifth term, has made three visits to North Korea, where he met the late North Korean leader Kim Jong-Il, father of current leader Kim Jong-Un.
In March, the UN Security Council adopted the heaviest sanctions ever imposed on North Korea after it went ahead with its fourth nuclear test on 6 January followed by a rocket launch a month later.
Sunday's visit to Uganda was Park's first since taking power in 2013 and is part of an East Africa tour that includes Ethiopia and Kenya.