In one of the most well known stories from the Old Testament book of 1 Kings, King Solomon is faced with a dilemma: Two women come to see him, and tell him they live in the same house and both recently gave birth. One night while they were all asleep, the first mother rolled over on her baby, killing him. According to the second woman, the first then switched the babies, claiming the living baby as her own.

The king cleverly suggests cutting the living baby in half so that the women can share him, and the true mother reveals herself by forfeiting her claim on the child so that he can live. The writer of 1 Kings presents this story as evidence of Solomon’s wisdom, but it also suggests that what we now call Sudden Infant Death Syndrome was as mysterious to the ancients as it is to us.

Today, SIDS is the leading cause of death of children under age 1, and more than 2,000 infant deaths are attributed to it in the U.S. every year. But a study published last week in the journal Pediatrics is a reminder of how far we’ve come, thanks to public-health campaigns to combat smoking, teen pregnancy, and dangerous sleeping environments.

For most of human history, including Solomon’s time, so-called “crib death” was attributed to “overlaying,” accidental suffocation caused by mothers sleeping in the same beds as their children. In ancient Egypt, mothers were condemned to hug their babies’ bodies for three days and nights after overlaying deaths.

By the turn of the 20th century, popular awareness of the problem was on the rise. W.B. Yeats depicted it in his heartbreaking 1906 poem “The Ballad of Moll Magee,” which reads, in part:

I lay upon my baby;

Ye little childer dear,

I looked on my cold baby

When the morn grew frosty and clear.

A weary woman sleeps so hard!

My man grew red and pale,

And gave me money, and bade me go

To my own place, Kinsale.

SIDS deaths have long inspired a combination of sympathy and blame. One Scottish survey in the late 19th century survey found “overlaying” deaths were clustered in wintertime and on Saturday nights, which the survey’s author chalked up to mothers’ drinking habits. Another Scottish survey found a dramatic drop-off in these deaths between 1912 and 1917, an improvement attributed to a change in a licensing law that apparently led to less drinking among women. (Many of the historic details here come from this fascinating 1985 academic paper on SIDS in history and literature.)

By the middle of the 20th century, epidemiologists were beginning to study the problem in greater depth, but remained helpless to solve it. The first definition of Sudden Infant Death Syndrome, written at a 1969 conference in Washington state, reads: “the sudden death of any infant or young child, which is unexpected by history, and in which a thorough post-mortem examination fails to demonstrate an adequate cause for death.”

In the following decades it became clear that plenty of SIDS deaths were explicable, and that the historic explanation of “overlaying” wasn’t far off: Many apparently mysterious deaths were actually caused by suffocation. The public-health focus has been on safe sleeping environments, in particular on encouraging parents to place babies to sleep on their backs in sleeping areas separate from the parents’ bed.

That message has had an enormous impact. SIDS deaths in America have declined by an astonishing 50 percent since the launch of “Back to Sleep,” a public-health campaign spearheaded by the National Institutes of Health in 1994. The lead researcher of last week’s new study, Richard Goldstein, who is the director of a SIDS research program at Boston Children’s Hospital, calls it “one of the most successful public-health campaigns of our time.”

Goldstein’s Pediatrics study, based on an analysis of 900,000 infant deaths between 1983 and 2012, suggests that safer sleeping arrangements are not a cure-all. Babies exposed to smoking face a higher risk of SIDS, for example. Breastfeeding seems to lower the risk, while premature birth raises it. And some infants apparently have otherwise undetectable brain abnormalities that make them less likely to rouse themselves if they’re not getting enough oxygen. These days, Goldstein told a reporter, the majority of infants who die of SIDS are not found sleeping on their stomachs.

That means there’s plenty of work left to do, both for medical researchers and for the people who translate their research into policy and public-health initiatives. But the bigger picture is that the safe-sleep campaigns have already been stunningly successful. The study also suggests that drops in teen pregnancy and smoking—the targets of their own major campaigns in the last 20 years—have also played a role in the dramatic decline of SIDS. That’s great news for public-health promoters, who can now point to not just one but three major victories. But it’s even better news for parents and babies.