Home › Garden pests › Bean fly
Garden pests
Bean fly
Ophiomyia phaseoli (formerly Melanagromyza phaseoli) · Insect
Also called bean (cowpea) fly (Pacific Islands).

Illustration
A tiny, shiny black fly whose maggots tunnel down from the leaves into the stems of young bean plants, so seedlings wilt, stunt or die. Clear old beans and legume weeds before sowing, then hill soil up around the stems once the seedlings are growing.
How to spot it
- Tiny pale pinpricks or 'windows' in young leaves, where the females feed and lay eggs.
- Thin winding mines in the leaves, silvery at first and later brown, easiest to see from underneath.
- Seedlings that wilt, droop and die in the first three to four weeks; older plants grow weakly, and their leaves hang down, dry out and fall.
- A swollen stem just above the soil that may crack open; split it to find cream maggots up to 3 mm (⅛ in) long with dark mouthparts, or brown, barrel-shaped pupae.
- The adult: a shiny black fly about 2–3 mm (⅛ in) long, with clear wings.
Easily confused with
Bean seed fly
Its maggots eat the seed and the shoot as it comes up, so beans fail to appear or come up twisted; it is a pest of cool, wet springs rather than the tropics.
Damping off
Seedlings collapse with a thin, pinched, water-soaked stem at soil level, with no mines in the leaves and no maggots or pupae in the stem.
Leaf miners
The winding mines stay in the leaves, and the plant keeps growing; bean fly maggots move on into the stem and the seedling wilts.
Where it's a problem
- Australia: Most common in tropical and subtropical coastal and subcoastal areas, including Queensland, the Top End of the Northern Territory, Western Australia and parts of New South Wales. It is generally not a problem inland.
- Asia, Africa and the Pacific Islands: A widespread pest of beans across tropical Asia and Africa, and in Fiji, Papua New Guinea, Samoa and other Pacific islands.
- North America: Recorded in Hawaii, where parasitic wasps were brought in against it in 1969, though outbreaks still happen.
- Elsewhere: Not recorded in New Zealand, the United Kingdom, Europe or Canada.
What to do
- Before sowing, pull out self-sown beans and legume weeds such as phasey bean, and don't sow next to an older bean crop.
- Check seedlings twice a week for the first three to four weeks, when they are most at risk; split a wilted stem near the soil to look for maggots.
- Two to three weeks after the seeds come up, hill soil up around the stems and mulch: damaged plants grow new roots above the damage, and the soil covers them.
- Keep an especially close eye on young plants in dry spells, when the damage is worst.
- After the last picking, remove and destroy the old plants, by burying or binning them, so the next crop doesn't inherit the flies.
If you use an insecticide, choose one labelled for bean fly and follow the label and local rules. Sources say the maggots are well protected inside the stems, and that spraying older plants may not be worthwhile: it is the seedlings that need protecting.
Vegetables it affects
Free account, no card needed. You sign up or sign in first, then the scanner opens.
Sources (4, from Business Queensland, Pacific Pests, Pathogens and Weeds, Northern Territory Government and others)
- Business Queensland: Bean fly
- Pacific Pests, Pathogens and Weeds: Bean (cowpea) fly
- Northern Territory Government: French beans (Agnote B11)
- EPPO Global Database: Ophiomyia phaseoli, distribution
Facts checked Wednesday 28 October 2026. General guidance only: follow your local council, agency and product label.