Uganda is a significant maize producer and exports a large part of its annual output to neighbouring countries including South Sudan, Democratic Republic of Congo and Kenya.

Delayed rains in many parts of the east African country pushed back crop planting for the first season of this year, meaning most crops are still young when the impact of the an armyworm attack is most devastating.

Uganda has previously suffered from the pest, which become moths. Its name derives from the fact it marches across the landscape in large groups while in the caterpillar stage, feasting on young plants and wiping out entire fields.

"The severity and extent of outbreaks are increased by extended drought periods followed by early season rainstorms that facilitate migration of the moths," the agriculture ministry said in a statement.

It said climate change had probably caused the infestation as the armyworm migrated to Uganda from countries that were hotter because of global warming.

So far the districts where the armyworm caterpillars have been detected are mostly in Uganda's east, centre and north, the ministry said, with crops such as maize, millet and sorghum, as well as pastures affected.

The statement did not say how much acreage was affected, but said a large quantity of pesticides and spray pumps had been procured and distributed to the affected districts.

Native to the Americas, the armyworm was first detected in central and western Africa in early 2016, and within two years had spread across almost all of sub-Saharan Africa, according to the United Nations Food and Agriculture Organization (FAO).

(Reporting by Elias Biryabarema; Editing by Hereward Holland and Barbara Lewis)