Vegetable pests Not sure it is this pest? Use the Pest Finder in anee.io ›

Bean Fly: How to Spot It and Protect Your Bean Seedlings

The bean fly is a tiny shiny black fly whose maggots tunnel into the stems of bean, mungbean and cowpea seedlings. Young plants wilt, stop growing or die. This page shows how to spot the bean fly early and how to protect the crop in its first four weeks.

Ophiomyia phaseoli 8 min read Updated October 18, 2026 By the anee.io agriculture team Read it all with Libre + Anee
An adult bean fly, Ophiomyia phaseoli, a tiny dark fly, shown close up in a museum collection
Photo: Lonsdale O, Murphy ST, Scheffer SJ, CC BY 4.0, via Wikimedia Commons

What Is Bean Fly?

The bean fly (Ophiomyia phaseoli) is found across tropical and subtropical Asia. It attacks navy bean, adzuki bean, cowpea, mungbean and other legumes. The Pacific Pests fact sheet says soybean is not an important host. A wild weed, the phasey bean, is also a host.

Both the adults and the maggots do harm, mostly on seedlings in the first 3 to 4 weeks after emergence. Older plants usually grow past it, but the young plants may not. So a field that loses its seedlings early loses its stand, and the farmer replants or accepts thin rows.

Quick facts
FactDetails
NameBean fly
Scientific nameOphiomyia phaseoli
KindInsect
Crops it attacksMungbean, cowpea, sitaw, string bean and other beans
Local namesNone recorded
Where it strikesSeedlings and stems and tillers
When it strikesIt matters in the first 3 to 4 weeks after the seedlings come up, and older plants usually outgrow it.
Life cycleThe adult fly lays white eggs near the leaf stalks. The tiny maggots tunnel down the leaf and the stem to the base, where they pupate at the stem and root junction. The maggot stage lasts about 10 days, and the pupa 10 to 12 days, depending on temperature.

How to Identify Bean Fly

Look at the seedlings during the first weeks. The adult fly is tiny, about 2 mm, shiny black, with clear wings. It makes small holes in the leaves where it feeds and lays eggs. The maggot is white, about 3 mm long and hides inside the stem, so you must cut the main stem open just above the soil to find the tunnel. Older plants may be yellow and stunted. The legume pod borer is different, because it attacks the flowers and pods, not the seedlings.

  • Small feeding holes in the young leaves.
  • Seedlings that wilt in the heat of the day, then die.
  • Weak, yellow and stunted plants.
  • A swelling at the base of the stem, near the roots.
  • White maggots, about 3 mm long, in a tunnel when you cut the stem open.
  • Pupae at the stem and root junction when you pull up a dead seedling.
Do not confuse it with

Seedling wilt can also come from damping off or from dry soil. Cut the stem open. The bean fly leaves a tunnel with a white maggot or a pupa. See damping off if you find no maggot.

How Bean Fly Hurts Your Crop

The Pacific Pests fact sheet says the flies and maggots cause weak growth, wilting and, in the worst cases, the death of the plant from swelling at the stem and root junction. The damage comes early, so the effect on the crop is a thin and uneven stand.

We found no Philippine yield loss figure or action threshold in the sources we could open. The advice is the same everywhere. Protect the seedlings through the first 3 to 4 weeks, and the crop usually grows past the problem.

How to Control Bean Fly

  1. Before planting, remove volunteer legumes and weeds in the legume family, and keep the new crop away from existing bean fields.
  2. Plant on time with a vigorous seed, and give the seedlings enough water and fertilizer so they grow fast through the first weeks.
  3. Hill up the soil around the plants at 2 to 3 weeks and put mulch around them. This helps the plant make new roots above the damaged part, according to Pacific Pests.
  4. Check seedlings 3 to 4 days after they emerge, then every few days, and cut a few stems open to look for maggots.
  5. In mungbean trials in Thailand, a spray of neem seed kernel extract at 5 percent worked as well as an insecticide against two bean fly species. The same study says to apply it no more than 4 times, to avoid harm to the plants.
  6. After harvest, collect the crop remains and burn or bury them. See the integrated pest management guide.

When a Spray Makes Sense

A spray makes sense only on seedlings, within the first 3 to 4 weeks. Pacific Pests suggests treating 3 to 4 days after emergence and repeating at 7 and 14 days if needed. Follow the FPA registered label, check that the product is registered for beans, and keep to the waiting time before harvest.

Active ingredients whose Philippine labels name it, best first. Always follow the label of an FPA registered product.
Active ingredientIRAC groupOn Philippine labels
DimethoateIRAC 1BA sound second choice. Registered products name it on mungbean, soybean, string bean and cowpea.
Lambda cyhalothrin plus thiamethoxamIRAC 3A plus 4AA sound second choice. 1 registered product names it on string bean.
CypermethrinIRAC 3AOlder or broad chemistry: a last resort. Registered products name it on mungbean, soybean, string bean and cowpea.
Lambda cyhalothrinIRAC 3AOlder or broad chemistry: a last resort. 91 registered products name it on mungbean.
ProfenofosIRAC 1BOlder or broad chemistry: a last resort. Registered products name it on mungbean, soybean, string bean and cowpea.
MethomylIRAC 1AOlder or broad chemistry: a last resort. Registered products name it on mungbean, soybean, string bean and cowpea.
MalathionIRAC 1BOlder or broad chemistry: a last resort. Registered products name it on mungbean, soybean, string bean, cowpea and more.
Fenobucarb (BPMC) plus chlorpyrifosIRAC 1A plus 1BOlder or broad chemistry: a last resort. Registered products name it on mungbean, soybean, string bean, cowpea and more.
CarbarylIRAC 1AOlder or broad chemistry: a last resort. Registered products name it on mungbean, soybean, string bean and cowpea.
CarbofuranIRAC 1AOlder or broad chemistry: a last resort. Registered products name it on mungbean, soybean, string bean, cowpea and more.

The table stops at the ten best. 6 more on Philippine labels for it are older or broad chemistry. The Pest Finder in anee.io lists every one, crop by crop, with the products sold here.

Spray safely

Use only products registered with the Fertilizer and Pesticide Authority, and follow the label for the rate, the timing and the protective clothing. Switch to a different insecticide group next time, so the pest does not learn to survive it. Our guide to integrated pest management explains how.

Keep It Out Next Season

  • Clear volunteer beans and wild legumes before planting, and keep the new crop away from old bean fields.
  • Plant on time with vigorous seed, and water and feed so seedlings grow fast through the first 3 weeks.
  • Hill up soil around the stems at 2 to 3 weeks and mulch. The plant grows new roots above the damage.
  • Where bean fly is common, sow a little more seed than usual to make up for lost seedlings.
  • After harvest, collect the crop remains and burn or bury them.

Natural Enemies and Biological Help

  • Small wasps parasitize the maggots in the stems. Spare them by not spraying past the seedling stage.
  • A 5 percent neem seed kernel extract on seedlings matched an insecticide in mungbean trials. Use it no more than 4 times.

Not Sure What You Are Seeing?

Take a clear photo of the insect, the damage and the whole plant, then ask Anee, the smart farm technician in anee.io, in Tagalog or English. Anee tells you what it most likely is and what to do at the age of your crop. You can also put your scouting days on the cropping calendar, so the team knows when to walk the field.

Catch it early this season

anee.io keeps your scouting, spraying and harvest on one calendar, and Anee answers when something looks wrong.

  • Scouting days dated from each lot's own planting day
  • Photos and notes for every lot
  • Anee, the smart farm technician, in Tagalog or English
Start free

Questions Farmers Ask About Bean Fly

Why do my bean seedlings wilt and die in the first weeks?
The bean fly maggots may be tunneling in the stem. Cut a wilted stem open just above the soil. If you see a white maggot or a tunnel, the cause is the bean fly. If not, check for damping off or dry soil.
Do older bean plants suffer the same damage?
Usually less. Pacific Pests says the damage is mostly in the first 3 to 4 weeks. After that, hilling up and good care help the plant grow past the attack.
Can I use neem for the bean fly?
In a Thai mungbean study, a neem seed kernel extract at 5 percent worked well against two bean fly species, about as well as a chemical insecticide. The study advised no more than 4 sprays.

Stop Bean Fly from costing you the harvest

With Libre + Anee, read the whole guide: how to be sure it is this pest, when it pays to act, and what to spray, by active ingredient.

The account is free, no credit card.