This paper revisits the relationship between agricultural productivity shocks and the infant sex ratio in India and investigates how this relationship changes when households have access to government-provided employment opportunities outside of agriculture. When a household’s preference for sons coincides with adverse agricultural productivity shocks, previous research shows that households tend to disproportionately reduce investments (prenatal and postnatal) in their female children. This behavior leads to a relatively more balanced sex ratio in good rainfall years and a more skewed sex ratio (in favor of boys) in low rainfall years. In a deviation from past work, we find evidence of this effect primarily through prenatal channels in modern India. More importantly, we show that a workfare program that decouples both wages and consumption from rainfall attenuates the relationship between rainfall and the infant sex ratio. Using a back-of-the-envelope calculation, we find that the program could have saved at least 0.7 million girls – relative to boys – if the government had implemented it from 2001 to 2005. Suggestive evidence also indicates that the program may have attenuated the positive effect of birth year productivity shocks on girls’ longer-term height-for-age.