In March of 2012, a three year old child in Oregon swallowed over three dozen magnet spheres. Each sphere measured only a few millimeters in diameter. But these magnets, known as neodymium magnets and marketed under the brand Buckyballs, were incredibly strong — per Wikipedia, neodymium magnets are the strongest type of permanent magnet made. As TIME reported, the magnets punctured the young girl’s stomach and intestines, requiring her to undergo surgery. She was luckier than others — the 2006, per TIME, the U.S. Consumer Product Safety Commission (CPSC) reported that at least one child had died from ingesting similar magnets in the preceding three years.

Since then, Buckyballs have been somewhat controversial. In July, the CPSC requested a recall of Buckyballs, but the company is fighting that recall, arguing that they’ve been clearly marketing the product to adults and eschewing opportunities to sell or market to children. But what’s bad for children may be OK for adults — and may be necessary for cows.

Yes, cows.

While humans are careful about what they eat, cows, well, aren’t. Put some hay or grass or anything else to graze on in front of them, and they’ll mindlessly start eating. They don’t do a very good job when it comes to figuring out what they’re eating, exactly; as Wikipedia notes, “they do not use their lips to discriminate between materials and they do not completely chew their feed before swallowing.” That’s not a problem if everything in front of them is digestible, but of course, that’s not always the case. Nails, wire, staples, etc. can get mixed up in the cow’s feed. When a cow accidentally ingests something metal, those metal pieces can get stuck in a part of their stomachs called the reticulum — and, over time, puncture holes in the lining. This condition, called “bovine traumatic reticuloperitonitis” or “hardware disease,” is painful for the cow and often leads to a dramatic reduction in the cow’s ability to produce milk. And no rancher wants that.

To fix this? Magnets.

Pictured above is a cow magnet, measuring about 8 centimeters long and 1 cm in diameter. The magnets are designed to sit in the cow’s rumen (here’s a chart of sorts) — it’s small enough to get there, but too large to pass further. And it sits there collecting stray metal before it can cause the cow pain. The magnet remains inside the cow for the life of the animal (and apparently can be reused afterward), and the presence of the magnet and the attracted metal in the rumen apparently has no effect on the cow’s health or lifespan.

Bonus fact : Cows are in tune with magnets in another way — they’re apparently somehow aware of the location of the magnetic poles of the Earth. As reported by the Guardian in 2006, when grazing or at rest, cows tend to stand facing north. The same is apparently also true for deer.

From the Archives: eMilk: Why buy the cow when you can get the milk online, with three or four day shipping?

Related: A cow magnet. $5. The image on that page has the magnet next to a penny, probably so that you can get a sense for how big the magnet is.