North Korea is pulling its troops from Uganda after Kampala severed ties, South Korea's Yonhap News Agency reported Sunday, quoting Pyongyang as saying the maneuver was not a forced withdrawal under international pressure but the expiry of a contract.

Ugandan President Yoweri Museveni pledged to cut all military ties with North Korea during a summit with South Korean President Park Geun-hye in May, Yonhap reported.

It said Uganda has asked that around 60 North Korean troops and state security officials leave the country.

"The personnel of DPRK are now withdrawing themselves from the country according to an agreement between the two countries," Yonhap quoted a North Korean Foreign Ministry official as telling the North's state news agency. DPRK is the abbreviation for the nation's official name.

As for talk of the U.S. putting Uganda under pressure in the matter, "this is indeed ridiculous," the official said.

Seoul and Pyongyang have for decades battled to win influence in Africa, where North Korea has several long-standing military clients.