Several years ago, our cattle grazed a pasture where shingles and nails had recently fallen from a replaced barn roof. Although the farmer cleaned up, the risk of stray nails remained.

Stepping on a nail is bad, but what’s worse is if a curious cow eats one. Cattle aren’t picky; they vacuum up grass along with anything mixed in. Sometimes metal objects, like nails or wire, go down the hatch, leading to “hardware disease.” A nail or wire can pierce a stomach chamber, causing infection or worse.

Years ago, a calf died. I suspected hardware disease but no autopsy confirmed it. And yet the signs are clear: arched back, painful steps and, in dairy cows, falling milk production.

The cure is simple: a cow magnet, a smooth three-inch metal pill delivered with a tool called a balling gun, which is a long tube with a plunger used for dosing cattle. The farmer inserts the balling gun in the cow’s mouth, past her second set of teeth, and pushes the plunger to eject the magnet.

The magnet then settles in the cow’s stomach, attracting stray metal and holding it in place. Sometimes the cow spits it out, and the farmer has to try again. One magnet lasts for the cow’s life. If she is eventually processed for beef later, the magnet can be recovered and reused. It’s frugal and practical.

After the calf died on our farm, we fenced off the suspicious area of that remote pasture, checked hooves for nails and when the herd came home, every bovine got a magnet. The magnets don’t interfere with their digestion and may even save a life.

Dan Athearn of Morning Glory Farm loaned me a magnet made in Denmark years ago. His magnet is encased in a plastic case, but most magnets are not. With or without a case, magnets help keep cows healthy.

Carole Soule is co-owner of Miles Smith Farm (milessmithfarm.com) and is frequent visitor the Vineyard. You can schedule an appointment to meet her magnetic cattle at her New Hampshire farm.