* Locust plague in East Africa is the worst in decades
* Shortages of planes, pesticides and funds hampering response
* Locusts breeding new generation
* UN: if left unchecked numbers could increase 400-fold by June
* For graphic of locust spread click on: https://tmsnrt.rs/2IcXQd7
By Omar Mohammed and Dawit Endeshaw
NAIROBI/ADDIS ABABA, Feb 27 (Reuters) - Countries in East Africa are racing against time to prevent new swarms of locusts wreaking havoc with crops and livelihoods after the worst infestation in generations.
A lack of expertise in controlling the pests is not their only problem: Kenya temporarily ran out of pesticides, Ethiopia needs more planes and Somalia and Yemen, torn by civil war, can't guarantee exterminators' safety.
Locust swarms have been recorded in the region since biblical times, but unusual weather patterns exacerbated by climate change have created ideal conditions for insect numbers to surge, scientists say.
Warmer seas are creating more rain, wakening dormant eggs, and cyclones that disperse the swarms are getting stronger and more frequent.
In Ethiopia the locusts have reached the fertile Rift Valley farmland and stripped grazing grounds in Kenya and Somalia. Swarms can travel up to 150 km (93 miles) a day and contain between 40-80 million locusts per square kilometre.
If left unchecked, the number of locusts in East Africa could explode 400-fold by June. That would devastate harvests in a region with more than 19 million hungry people, the U.N. Food and Agriculture Organization (FAO) has warned.
Uganda has deployed the military. Kenya has trained hundreds of youth cadets to spray. Lacking pesticides, some security forces in Somalia have shot anti-aircraft guns at swarms darkening the skies.
Everyone is racing the rains expected in March: the next generation of larvae is already wriggling from the ground, just as farmers plant their seeds.
"The second wave is coming," said Cyril Ferrand, FAO's head of resilience for Eastern Africa. "As crops are planted, locusts will eat everything."
The impact so far on agriculture, which generates about a third of East Africa's economic output, is unknown, but FAO is using satellite images to assess the damage, he said.
In Kenya, the region's wealthiest and most stable country, the locusts are mostly in the semi-arid north, although some crops have been affected, said Stanley Kipkoech, a senior official at the Ministry of Agriculture.
This month, Kenya ran out of pesticide for about a week and a half, he said. Farmers watched helplessly as their families' crops were devoured.
In Ethiopia, the government can only afford to rent four planes for aerial spraying, but it needs at least twice that number to contain the outbreak before harvesting begins in March, Zebdewos Salato, director of plant protection at the Ministry of Agriculture, told Reuters.
"We are running out of time," he said.
Ethiopia's single pesticide factory is working flat out.
The country needs 500,000 litres for the upcoming harvest and planting season but is struggling to produce its maximum 200,000 litres after foreign exchange shortages delayed the purchase of chemicals, the factory's chief executive Simeneh Altaye said.
FAO is helping the government to procure planes, vehicles and sprayers, said Fatouma Seid, the agency's representative in Ethiopia. It is also urgently trying to buy pesticides from Europe.
MONEY AND GUNS
Pest controllers in Somalia can't enter areas controlled by the Islamist al Shabaab insurgency, said Aidid Suleiman Hashi, environment minister for the southern region of Jubbaland.
When the locusts invaded, residents blew horns, beat drums and rang bells to scare away the insects. Al Shabaab fired anti-craft and machine guns at the swarms, Hashi said. Jubbaland forces, not to be outdone, did so too.
Under such circumstances, contractors are reluctant to do aerial spraying, FAO said.
Meanwhile, locusts - which have a life cycle of three months - are breeding. FAO says each generation is an average of 20 times more numerous.
When eggs hatch, as they are doing now in northern Kenya, the hungry young locusts are earthbound for two weeks and more vulnerable to spraying than when they grow wings.
After that, they take to the air in swarms so dense they have forced aircraft to divert. A single square kilometre swarm can eat as much food in a day as 35,000 people.
FAO said containing the plague will cost at least $138 million. So far, donors have pledged $52 million. Failure means more hunger in a region already battered by conflict and climate shocks.
Since 2016, there have been droughts in Kenya, Somalia, Ethiopia, then floods, Ferrand said. In South Sudan, more than half the population already faces food shortages.
The rains that blessed the region with a bumper crop last year after a prolonged drought also brought a curse.
A cyclical weather pattern in the Indian Ocean, intensified by rising sea temperatures, contributed to one of the wettest October-December rainy seasons in five decades, said Nathanial Matthews of the Stockholm-based Global Resilience Partnership, a public-private partnership focused on climate change.
Locusts hatched in Yemen, largely ignored in the chaos of the civil war. They migrated across the Red Sea to the Horn of Africa, then spread to Sudan, Djibouti, Ethiopia, Somalia and Kenya. Now they have been spotted in Uganda, South Sudan and Tanzania.
The rains awoke the dormant eggs then stronger and more numerous cyclones scattered the insects. Eight cyclones tore across the Indian Ocean in 2019, the highest number in a single year since records began, said Matthews.
(Additional reporting by Abdi Sheikh in Mogadishu, Abdiqani Hassan in Garowe, Somalia, Denis Dumo in Juba; Writing by Omar Mohammed; Editing by Katharine Houreld, Alexandra Zavis and Mike Collett-White)