Earthworms are a gardener’s best friends. Studies have found many plants that perform significantly better in earthworm-rich soil than in soil with relatively few earthworms. This is because earthworm burrows help air, water, and plant roots make their way more easily through the soil. As they burrow, earthworms leave behind castings (earthworm poop) that enrich the soil. Earthworm castings contain compounds that can improve plants’ resistance to disease. Earthworms can even rid the soil of certain types of contaminants, including PCBs.

In addition to being good for the soil, earthworms are also good for your garden in other ways. Earthworms are a favorite food for many backyard predators, most of which are equally happy to take a bite out of your pest population. Among the animals that enjoy a tasty earthworm supper are mosquito-snapping toads and turtles, a variety of birds, and beneficial insects such as carabid beetles, which are also a major predator of slugs and other garden pests. Even humans can eat earthworms – in some aboriginal cultures they are appreciated for their extremely high levels of protein and other nutrients.

Earthworms are so important to the health of soils and gardens that many gardeners deliberately raise them in worms bins or other vermicomposting systems. However, it is possible to get great results in your garden simply by improving earthworm habitat. For creatures with no brains, earthworms are remarkably quick to find habitat they like, and they will reward you with rich soil and a beautiful garden if you provide it for them.

Avoid Using Pesticides

Pesticides are one of the two biggest threats to earthworms today. Many common pesticides kill earthworms if allowed to drip onto the soil, some with mortality rates as high as 100%. Some chemical fertilizers and herbicides can also kill earthworms.

The best choice for an earthworm-friendly garden is to go organic. Although gardeners making the switch from conventional to organic gardening often lose more plants to pests at first, in the long term, many organic gardeners report lower rates of plant loss to pests, diseases, and weeds, because organic gardening techniques build healthier soil and maintain healthy populations of worms and other beneficial insects and animals.

If you absolutely must use pesticides, cover the ground in the area where you’re planning to apply them with a plastic sheet to protect the soil, especially in spring and fall when earthworms are most likely to be near the surface.

Avoid Unnecessary Cultivation

The second biggest threat to earthworms is cultivation. Although some earthworm species are capable of regenerating their “tail” end if chopped in two by a plow, shovel, rototiller or other cultivation tool, others will simply die. Studies have found a direct correlation between the frequency of cultivation and the number and size of earthworms: the more frequently the ground is cultivated, the fewer and smaller the worms.

Unfortunately, many garden seeds need a prepared bed in order to germinate. So what’s a gardener to do?

Whenever possible, cultivate garden beds by hand, with a shovel or, even better, a digging fork. Hand cultivation has a significantly lower mortality rate for earthworms than machine cultivation. Instead of redigging your garden every year, consider creating permanent, raised beds. Within a year or two, soil tilth in a permanent raised bed will be improved to the point that it may need little more than a rake to prepare it for spring planting.

When creating new gardens with seedlings and young plants, consider digging only enough to create holes to plant the seedlings, and sheet mulching (about which more in a moment) around them to kill grass, weeds, or other undesirables, instead of digging up the whole area of the new garden bed.

When extensive cultivation is necessary, you can minimize earthworm causalities by luring them to an area away from the spot where you want to dig.

A few days before you plan to start digging, lay down a thick layer of spoiled hay, pulled weeds, kitchen scraps, and other organic matter in an area next to the place you want to dig, and wet it down thoroughly to make it attractive to earthworms. Hay bales also work well. This will draw worms out of the area you plan to cultivate and towards safety.

Farmers interested in increasing their worm populations on their farms can practice conservation tillage to protect worms, reduce carbon emissions, and improve soil quality, among many other benefits.

Feed Earthworms With Compost

Compost piles not only make great habitat for some worm species, they also turn out batch after batch of delicious worm food. Spreading a thick layer of finished compost on new garden beds, or digging it in when you plant, is a great way to improve your soil, produce healthier plants, and attract worms, all at the same time.

You can also use worms to speed up your composting process. This is called vermicomposting, and it is popular with gardeners around the world. A well designed and managed vermicomposting system is so odorless that you can even keep it indoors!

The simplest way to compost with worms is to dump a big pile of organic matter such as autumn leaves or manure in a place where you want to attract worms and let it sit for awhile to compost in place. Make sure the pile stays moist and shaded, and it will draw worms like a magnet. After a few months to a year, depending on the size of the pile and the type of organic matter, you will be able to spread the finished compost (and its worm population) onto an existing bed, or dig it in to the ground to create a new one.

Other gardeners dig a trench and fill it with kitchen scraps, grass clippings, manure, and other compost materials, before covering it over with a layer of dirt or mulch. Earthworms will be naturally drawn to this treasure trove and will spread the resulting compost into the surrounding soil.

Shelter Earthworms With Mulch

Laying down organic mulches is one of the best things you can do for your worm population.

Worms are easily killed by surprise frosts on unprotected soil in spring and fall. Mulch provides an insulating blanket that protects them from the cold. It also helps keep soil cool and moist – worm heaven – in summertime, when worms living in unprotected soil are driven deep underground to hide from warm temperatures and dry soils.

Not only that, organic mulches amount to an all-you-can-eat buffet for worms. Mulches such as straw and shredded leaves are especially favored.

Sheet Mulching

One type of mulch that makes frequent use of straw and shredded leaves is sheet mulch. Sheet mulching (also sometimes known as “lasagna gardening” or “comforter composting”) is a method of mulching that is often used to create a new garden bed with no cultivation, so it’s doubly beneficial for worms because it saves them from being crushed or butchered by garden tools or machinery, while also offering the other benefits of organic mulches.

Sheet mulching is simply laying down thick layers of several different types of mulch in order to kill grass, weeds, and other unwanted plants. The new bed is either left to sit and compost in place for awhile, or planted immediately, depending on the types of mulch used and the plants chosen for the bed.

Sheet composting often begins with a layer of newspaper or cardboard, followed by layers of any combination of the following:

spoiled hay

straw

shredded leaves

grass clippings

finished compost

kitchen scraps, pulled weeds, and other unfinished compost

sawdust

wood chips

pine needles

stable sweepings

animal manures (fresh or aged)

chopped corn cobs

wood ashes

and more

The sheet mulch should be about 6-12 inches thick when fully laid down.

Groundcovers and Cover Crops

You can also use plants as a type of living “mulch.”

Like organic mulches such as straw and wood chips, groundcovers and cover crops help keep the soil moist and shaded in summertime, and protect earthworms from temperature extremes in spring and fall. The roots systems of deep or fibrous rooted plants also help break up the soil and make it more friendly to earthworms, while the earthworms return the same favor for the plants.

Plant ground covers anywhere there’s a place for one, and consider adding a fall/winter or early spring cover crop to your vegetable garden rotation. Legumes such as clover and alfalfa are particularly good for attracting worms.

You can also manage your lawn to be earthworm friendly. Set your blades to the maximum height recommended for your type of grass so the grass can shade and cool the soil, and practice “grasscycling” – leave grass clippings where they fall, instead of raking them up. (If necessary, cut smaller amounts more frequently to avoid smothering the grass.) Grasscycling not only provides a natural source of nitrogen for your lawn so you can use less fertilizer, it also provides food for worms.

As a gardener you can expect earthworms to be one of your greatest allies whether you help them or not, but they will return any help you do offer them many times over with richer soil, healthier plants, and a more beautiful and productive garden.

Kerry is the author of P is for Princess: The Extraordinary Lives of 26 Real-Life Princesses, and numerous articles and blog posts on topics such as history, science, gardening, sustainability, and women’s issues.