
Most gardeners think of pest control as a spray bottle problem. Something goes wrong, something gets applied, and you hope for the best. The reality is that one of the most effective pest management strategies has been growing in cottage gardens for centuries, and it doesn’t cost much more than a seed packet.
Companion planting is a practice in which specific plants are grown together to naturally repel pests, attract beneficial insects, and promote overall plant health. The science behind it has matured considerably in recent years, giving gardeners real, evidence-based reasons to mix flowers into their vegetable beds. These five flowers are among the most well-supported by research, and they happen to be beautiful while they work.
1. French Marigold (Tagetes patula): The Underground Defender

Below ground, marigold roots secrete a sulfur-containing compound called alpha-terthienyl. This chemical doesn’t just repel soil-dwelling pests; it kills them. Research published in Biology Open showed that alpha-terthienyl penetrates the outer skin of root-knot nematodes and triggers a burst of oxidative stress inside their cells.
The strongest evidence for marigolds as pest control is against root-knot nematodes. These soil-dwelling parasites attack the roots of tomatoes, peppers, carrots, and many other vegetables, causing stunted growth and wilting.
A 2019 study published in PLOS ONE confirmed that glasshouse whiteflies are repelled by French marigolds. The mechanism was the limonene released by marigold foliage, which disrupted the whiteflies’ ability to locate their host plants by scent. It’s worth noting that the science is more nuanced than general lore suggests: to work against nematodes, marigolds need to be grown as a solid cover crop for at least two months before being tilled in, not just planted as a border.
Marigolds are also excellent at attracting beneficial insects that prey on garden pests. Their bright, open flowers provide pollen to many garden allies, such as ladybugs, hoverflies, and parasitic wasps. Ladybug and hoverfly larvae are voracious predators of aphids, while parasitic wasps can help control caterpillars and other soft-bodied insects.
2. Nasturtium (Tropaeolum majus): The Clever Decoy

Nasturtiums serve as a trap crop for cabbage pests, such as cabbage white butterflies and aphids, by attracting these pests away from the cabbage. This method protects the cabbage from being eaten or damaged by these pests.
Research confirms that nasturtium can help reduce squash bug populations. A study in Iowa showed that nasturtiums and marigolds both helped to reduce damage from squash bugs and cucumber beetles.
Nasturtium companion planting works particularly well with several vegetables, including Brussels sprouts, cabbage, and beans. They are also great companions for squash, acting as a trap crop for pests like squash bugs and cucumber beetles. Vine-like nasturtium planted among squash vines will confuse bugs, which go for the nasturtiums thinking they are squash.
Their bright flowers and foliage can attract beneficial insects, promoting pollination and a balanced ecosystem. Their unique ability to thrive in poor soil conditions makes them an easy-to-maintain addition to your gardening routine.
3. Sweet Alyssum (Lobularia maritima): The Tiny Powerhouse

Sweet alyssum is one of the most underused companion plants in vegetable gardens. In UC Davis research testing 22 candidate insectary plants, sweet alyssum proved the most effective at suppressing aphid populations, with measurable aphid reduction extending up to 50 feet from where the alyssum was growing.
The mechanism: alyssum’s tiny, densely packed flowers are accessible to small parasitic wasps, syrphid fly adults, and green lacewings, all of which lay eggs near aphid colonies so their larvae can feed on them. It works by pulling natural predators in, rather than simply pushing pests away.
Plant alyssum near lettuce and brassicas to attract hoverflies, whose larvae feed on aphids. In a Florida study, African marigolds and sweet alyssum were planted with squash, which increased the number of natural enemies of aphids and had a slightly positive impact on yield.
Sweet alyssum is very attractive to pollinators and is useful as a living mulch to keep weeds down between rows. It also provides shelter for ground beetles and spiders, both of which are quiet allies against soil pests.
4. Calendula (Calendula officinalis): The All-Purpose Protector

Calendula is especially helpful at repelling asparagus beetles and tomato hornworms, and can be planted near almost any kind of vegetable or herb. Few flowers are this broadly compatible across the edible garden.
The flowers come in bright colors, in shades of yellow, orange, and gold. As well as looking good and deterring a long list of pests, calendula are also edible flowers. Calendula is known to repel whitefly, aphids, cucumber beetle, flea beetle, squash beetle, and corn earworm.
Calendula draws in bees, predatory beetles, and other beneficial insects while also deterring aphids and nematodes. Nasturtium and calendula together can lure aphids away from runner and French beans, making them especially useful when planted in pairs along bean rows.
Growing calendula or cosmos nearby will attract tiny parasitizing wasps and aphid-hungry hoverflies. Given how easy it is to grow from seed and how long it blooms, calendula offers exceptional value per square foot of garden space.
5. Lavender (Lavandula angustifolia): The Fragrant Perimeter Guard

Planting lavender in a garden can help deter specific garden pests, primarily due to the natural compounds, especially linalool and linalyl acetate, present in its foliage and flowers. The strong, aromatic scent released by the plant is generally disliked by many insects, disrupting their ability to find host plants or simply making the area less appealing.
Lavender attracts pollinators, assisting in crop pollination. It also repels pests that can harm food crops, particularly brassicas such as broccoli, cabbage, and cauliflower. It works best planted alongside carrots and leeks, where its scent creates an olfactory barrier around roots that certain flies target.
When planted alongside other strongly aromatic herbs like rosemary, thyme, sage, or basil, lavender contributes its unique scent to a collective “scent shield.” This diverse blend of powerful fragrances is often more confusing and off-putting to a wider range of pests than a single scent alone.
Lavender’s flowers are highly attractive to pollinators and beneficial predatory insects like ladybugs, parasitic wasps, hoverflies, and lacewings. Once attracted, these beneficial insects will help control pest populations by preying on aphids, spider mites, caterpillars, and other destructive insects. So lavender contributes to pest control both directly through repelling and indirectly through attracting predators.
How Companion Planting Actually Works: The Science Behind It

Research published in the Journal of Chemical Ecology has shown that certain plants release chemicals through their roots or foliage that can repel pests or attract beneficial insects. These interactions happen both above and below the soil surface, which is part of what makes the system so layered.
Companion planting is based on the principle that certain plants can influence the growth, flavor, and pest resistance of their neighbors. In the context of pest control, companion plants perform one or more functions: repelling pests through strong odors or chemicals, or attracting predatory insects that feed on those pests.
Thanks to recent University Extension research across the country, there are now proven strategies for companion planting that are backed by evidence. These strategies can help reduce or eliminate the use of insecticides in the vegetable patch.
The Trap Crop Strategy: Sacrificing a Few to Save the Many

Plants can be used to pull pests away from other crops as trap crops, and can make insects less likely to land on garden vegetables because there are too many signals to interpret. It’s counterintuitive at first: you’re deliberately attracting pests to certain plants. The goal, though, is to concentrate them where they can be managed more easily.
Nasturtium works especially well as a trap crop near beans and cabbage, drawing pests away from your main crops. Nasturtium also protects against aphids and whiteflies when used strategically throughout the bed.
Marigolds can also act as trap plants, meaning that they are more attractive to certain pests than the vegetables planted close by. In a recent study, yellow marigolds were found to be more attractive to western flower thrips than orange ones and to be of value in preventing pests from destroying greenhouse ornamentals.
Attracting Beneficial Insects: Your Garden’s Natural Pest Control Squad

Pest populations can be managed by incorporating non-crop vegetation, such as flowering plants also known as insectary plants, into a cropping system. Flowering companion plants are incorporated into mixed vegetable farms to enhance the efficacy of natural enemies and improve pest suppression.
Predator insects eat other insects, and parasitoids lay their eggs inside of other insects. By providing habitat and food for these insects, you can attract them to your garden to help manage pests. Flowers like sweet alyssum and calendula are particularly well-suited to this role because their small, open blooms are physically accessible to tiny parasitic wasps.
Marigolds attract ruthless predators that devour pests, including ladybugs, lacewings, parasitic wasps, and hoverflies. Bugs like these create a thriving, balanced garden ecosystem where pests rarely spiral to problem levels.
Practical Placement: Where to Actually Put These Flowers

Mix flowers and herbs throughout your vegetable beds to attract beneficial insects. Combine tall and low-growing crops to improve light use and protect sensitive plants. There’s no single template, but the general principle is to intersperse rather than isolate.
Plant insect-repelling herbs like lavender or rosemary along the edges of vegetable beds to deter pests from entering the garden. Incorporate flowering plants like calendula or sunflowers in borders to attract beneficial insects such as bees and butterflies, thereby promoting pollination and natural pest control.
Each flower targets specific pest species, so combining multiple varieties creates comprehensive protection for different crops throughout your growing season. Think of it as building overlapping layers of defense rather than relying on any single plant to do everything.
What the Research Does and Doesn’t Say

While gardening charts online will provide long lists of plants that repel insects, these are not always accurate or backed by research. It’s worth being honest about this. The science of companion planting is real, but it is also uneven, with some plant pairs being well-studied and others resting almost entirely on tradition.
There is very little scientific evidence that the aroma of marigold plants actually repels pests above ground; however, it is a generally accepted scientific fact that marigolds help to control nematodes and attract beneficial insects that aid in controlling unwanted pests. The distinction matters: soil-level effects are far more documented than above-ground scent deterrence.
Companion planting recommendations from reputable sources combine generations of gardening experience with research from universities and agricultural extensions. That combination, practical observation layered over controlled study, is probably the most honest framing for where the science currently stands.
Conclusion: A Garden That Works With Nature

None of these five flowers require special skills to grow. Most are available as inexpensive seeds, and several, like nasturtiums and sweet alyssum, will self-seed and return year after year with minimal effort. The research backing them continues to expand, with university extension programs and field trials adding to what was once purely anecdotal knowledge.
While chemical pesticides can be effective, they often have harmful consequences for the environment, soil health, and beneficial insects. A sustainable and effective alternative is companion planting, a practice in which specific plants are grown together to naturally repel pests, attract beneficial insects, and promote overall plant health.
The deeper shift that companion planting encourages is less about any single flower and more about how you think about your garden as a whole. A diverse bed is a resilient bed. Pests thrive in monocultures; they struggle in ecosystems. Planting a few blooms alongside your tomatoes and beans isn’t a cure-all, but it is one of the quieter, more lasting things you can do for the health of your soil and your harvest.
AI Disclaimer: This article was created with the assistance of AI tools and reviewed by a human editor.