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

Melon Fly: How to Spot It and Save Your Ampalaya and Squash

The melon fly is the fruit fly that ruins ampalaya, upo, cucumber, squash and melon from the inside. The female stings the young fruit, and the maggots turn the flesh to rot. This page shows how to spot the melon fly early and how to stop it with bagging, clean fields and bait.

Zeugodacus cucurbitae 7 min read Updated October 18, 2026 By the anee.io agriculture team Read it all with Libre + Anee
A melon fly, Zeugodacus cucurbitae, orange brown with yellow marks, on a leaf
Photo: Scott Bauer, USDA Agricultural Research Service, Bugwood.org, CC BY 3.0 US, via Wikimedia Commons

What Is Melon Fly?

The melon fly (Zeugodacus cucurbitae) is a fruit fly that attacks mostly cucurbits, such as bitter gourd, cucumber, melon, pumpkin, watermelon, wax gourd and luffa. It also stings tomato, chili, capsicum and beans, though these are secondary hosts.

The Pacific Pests fact sheet reports melon losses of 5 to 40 percent in the Philippines. It also lists much higher losses in other countries, such as 95 percent of bitter gourd in Papua New Guinea. That is why many growers lose a whole picking when they miss the first stung fruits.

Quick facts
FactDetails
NameMelon fly
Scientific nameZeugodacus cucurbitae
KindInsect
Crops it attacksAmpalaya (bitter gourd), upo, patola, cucumber, squash, melon and watermelon
Local namesNone recorded
Where it strikesFruits, pods and nuts
When it strikesIt attacks from flowering and fruit set until harvest. So it is a problem every season where cucurbits are planted one after another.
Life cycleThe female stings young fruit and lays eggs inside, and the maggots feed within. The mature maggots drop into the soil to pupate. A life cycle takes 3 to 5 weeks in good conditions, and a female can lay about 1,000 eggs.

How to Identify Melon Fly

Look at young fruit for small puncture marks, called stings, where the female laid eggs. The fruit may ripen too early at that spot, or look water soaked. Cut a stung fruit and you will see white maggots, 7.5 to 9 mm long. The adult fly is orange brown and 6 to 8 mm long. It has smoky brown blobs at the wing tips and a T shaped mark on the abdomen. The oriental fruit fly looks similar but it stings tree fruits like mango rather than gourds.

  • Small sting marks on young fruit where the female laid her eggs.
  • Fruit that ripens or yellows too early where the eggs were laid.
  • Young fruit that falls off the vine.
  • Water soaked or soft patches on mature fruit.
  • White maggots inside the cut fruit, and soft, rotting flesh.
  • Orange brown flies with a T shaped mark resting on the leaves or the fruit.
Do not confuse it with

Other fruit flies sting vegetables and fruit trees too. The oriental fruit fly prefers tree fruits such as mango and papaya. Gourd rot can also come from fungus, so look for the sting mark and maggots to be sure.

How Melon Fly Hurts Your Crop

The female also puts bacteria into the fruit with her eggs. These bacteria rot the flesh and feed the larvae. Young fruits often drop, and mature fruits go soft. That damage cannot be undone, and an infested fruit cannot be sold.

The Pacific Pests sheet reports losses of 5 to 40 percent in melon in Luzon. A University of Hawaii extension paper puts melon fly losses at 30 to 100 percent of the crop in unprotected cucurbits worldwide. It gives no Philippine action threshold. So the safe rule is to monitor twice a week from flowering, and to act as soon as you find stings.

How to Control Melon Fly

  1. Check the plants twice a week from flowering. Look for stings and for flies on the leaves and fruits.
  2. Bag the young fruit as soon as it forms. The fact sheet suggests a fine mesh with a weave of about 2 mm by 1 mm around each fruit.
  3. Remove and destroy all stung and fallen fruit every few days. Bury it deep, burn it, or seal it in a plastic bag in the sun. Do not leave it on the field, because the maggots will pupate in the soil.
  4. Rotate. Do not follow one cucurbit crop with another, and keep new plantings away from old ones.
  5. Use a cue lure trap to catch males and to monitor the numbers. Add protein bait to attract the females, as the Pacific Pests sheet and the University of Hawaii advise.
  6. Put the bait on the plants where the flies rest. In Hawaii trials the flies roosted most on border plants such as castor bean, bamboo, mango and cassava. So treat those borders first.
  7. Destroy the crop remains after the last harvest. See the integrated pest management guide.

When a Spray Makes Sense

Use a spray only as a bait spray. Mix a protein bait such as yeast autolysate with an insecticide. Then spray it on the underside of the leaves where the flies rest, not on the fruit. Pacific Pests says to apply it weekly from fruit set to harvest. Follow the FPA registered label and the waiting time.

Active ingredients whose Philippine labels name it, best first. Always follow the label of an FPA registered product.
Active ingredientIRAC groupOn Philippine labels
Lambda cyhalothrin plus thiamethoxamIRAC 3A plus 4AOlder or broad chemistry: a last resort. 50 registered products name it on bitter gourd.
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

  • Bag young fruit as soon as it sets, in paper or fine mesh, before the flies find it.
  • Every few days pick up stung and fallen fruit. Bury it deep, or seal it in a plastic bag in the sun.
  • Hang cue lure traps around the field to catch males and to see when the flies arrive.
  • Spot spray protein bait mixed with an insecticide weekly on border plants and leaf undersides, never on the fruit.
  • Do not follow one cucurbit crop with another. Plant with your neighbors and destroy crop remains after the last harvest.
  • Plow or turn the soil after harvest to expose the pupae.

Natural Enemies and Biological Help

  • Ants, ground beetles and spiders eat larvae and pupae in the soil. Chickens let into the field after harvest eat many more.
  • Small braconid wasps such as Psyttalia fletcheri lay their eggs in the maggots. Bait sprays spare them better than cover sprays.

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 Melon Fly

Why do my ampalaya fruits rot while they are still small?
The melon fly may have stung them. The eggs hatch inside, and the maggots and bacteria rot the flesh. Cut an affected fruit open to check for white maggots.
Does bagging really work?
Yes. The Pacific Pests fact sheet lists bagging, field sanitation, protein baits and cue lure traps as the main ways to manage the melon fly. Bag the fruit while it is still small.
Can I spray the fruit to kill the maggots?
No, a spray cannot reach the maggots inside. Spray a protein bait mix on the leaves to kill the flies. Also bag the fruit and clean the field to stop the eggs.

Stop Melon 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.