A growing body of research argues that early adverse experiences have lasting effects not only on later health outcomes, but also on human capital accumulation. This paper investigates the persistent effect of negative shocks early in life on children's health and cognitive outcomes, and explores whether shocks at certain periods matter more than others. The paper exploits the geographic intensity of extreme floods during the 1997-1998 El Nino phenomenon in Ecuador as a source of exogenous variation in children's exposure to a negative shock at different periods early in life. It is shown that children exposed to severe floods in utero, especially during the third trimester, are shorter in stature five and seven years later. Also, children affected by the floods in the first trimester of pregnancy score lower on cognitive tests. Potential mechanisms are explored by studying how exposure to the El Nino shock affected key inputs to the production of children's human capital: birth weight and family inputs (income, consumption, and breastfeeding). Children exposed to El Nino floods, especially during the third trimester in utero, were more likely to be born with low birth weight. Furthermore, households affected by El Nino 1997-98 suffered a decline in income, total consumption, and food consumption in the aftermath of the shock. Moreover, exposure to El Nino floods decreased the duration of exclusive breastfeeding and increased the duration of non-exclusive breastfeeding. Falsification exercises suggest that selection concerns such as selective fertility, mobility, and infant mortality do not drive these results.