Knowledgebase

Gnat help #948074

Asked November 03, 2026, 5:27 PM EST

I’ve tried nematodes and sprays to stop these gnats in my backyard, nothing works and they are so bad that my kids can’t play in the yard. Can you help identify them and tell me how I can get rid of them please? Thank you!

Montgomery County Maryland

Expert Response

Unfortunately we aren't able to ID the insect from the photo, which is too dark and not able to clearly show its body shape and wings. Can you please resend other photos in better lighting (the insect can't be squished, which will distort or destroy key ID features), alongside a ruler for scale?

Is the backyard near a natural wetland area or pond? If so, the flies might be originating there and would not be treatable without risking harm to other wildlife. Fly larvae (including gnats) need to breed in damp organic matter, which can include compost piles that are kept too wet, partially-clogged roof gutters, or any area of the landscape that collects water and drains slowly after rain or an irrigation system run.

Aside from Bt, the same biologically-derived toxin used to treat water with mosquito larvae, there isn't really a fly-specific insecticide treatment option. Insect-parasitic nematodes can help with some pests, but until the origin of the gnat larvae can be identified, their use probably won't help much. (Where were the nematodes applied before? And what sprays were used? Most sprays are broad-spectrum chemicals and risk harming other insects, like pollinators, fireflies, and species that can eat pests like flies.)

Miri
Hi, thanks! No, it's just a regular backyard in Potomac, no wetlands or anything. 

Do these help? 

image
image
image


On Wed, Nov 4, 2026 at 8:29 AM Ask Extension <<personal data hidden>> wrote:
The Question Asker Replied November 13, 2026, 10:20 AM EST

Thank you for sending the additional photos. Since the fly is so small, we unfortunately cannot see the identifying traits we would need for a further identification. If you are interested in identifying this particular fly you are welcome to reach out to your local Montgomery County Extension Office and see if they would be willing to take some clearer photos for you, particularly if they have a microscope.

It is possible there are multiple types of flies in your backyard, as Maryland is home to over 1,500 fly species. 

As Miri, said there is unfortunately not much that can be done about high fly populations outdoors. Outdoor flies can be difficult to control as they naturally occur outdoors and their populations can fluctuate year-to-year, season-to-season, based on various factors such as weather and outdoor sources of organic matter. Phorid flies, a common group of outdoor flies, are very difficult if not impossible to control outdoors since new ones can be flying in from different areas (outside of your property). What you can do is manage them indoors and use protective measures when outdoors.

The most effective way to reduce their numbers is to locate and eliminate the larval (immatures') food source. This can be challenging because many flies can develop in many types of damp, decaying organic matter, including pet waste, organic buildup inside drain pipes, residue in trash receptacles, and similar materials.

Because septic systems can serve as breeding sites, we recommend having your system inspected and maintained regularly (if relevant). In addition, look for any pipe leaks and other areas where damp, decaying organic matter may accumulate, such as compost piles located against the house or roof downspouts that discharge close to the foundation. Phorid flies are also sometimes called "coffin flies" because they can develop in animal remains. While less common, a recently buried animal near the home or a dead rodent in a wall void could also be supporting the infestation. 

As I mentioned, managing them in outdoor spaces can be complex because they are widespread and can breed in a wide range of organic matter sources, rather than being associated with a specific issue or causal agent that can be addressed. As a result, there are not many fly-specific management tactics for outdoor environments, outside of identifying and cleaning up sources of unintentional/unwanted organic matter around your home.

When outdoors, we recommend strong outdoor fans pointed at you if you are sitting on a porch, insect netting, and insect repellent. We generally do not recommend outdoor sticky traps as these flies are in such high numbers and sticky traps can ultimately trap any outdoor insect leading to bycatch of other potentially beneficial species. 

We understand how frustrating nuisance flies can be when you’re trying to enjoy the outdoors. Unfortunately, the location of your home and surrounding area may provide favorable conditions for these flies to thrive. Their populations are also likely to fluctuate from year to year, depending on environmental conditions. Outdoor mesh tents/netting may be helpful.

Loading ...