We examine the long-term consequences of restricted access to abortion following a change in the Hungarian abortion law in 1974. Due to a change that restricted access to legal abortions, the number of induced abortions decreased from 169,650 to 102,022 between 1973 and 1974, whereas the number of live births increased from 156,224 to 186,288. We analyze the effects on the adult outcomes of the affected cohort of newborns (educational attainment, labor market participation, teen fertility). We use matched large-scale, individual-level administrative datasets of the Hungarian Central Statistical Office (population census 2011; live birth register), and we estimate the effects by comparing children born within a short timespan around the time the law change came into effect. We apply a difference-in-differences approach, building on the special rules of the new law that, despite the severe restriction, still made abortion permissible for selected groups of women. We control for the compositional change in the population of parents, rule out the effect of (unobserved) time trends and other potential behavioral responses to the law change, and draw causal inferences. We find that restricted access to abortion had, on average, a negative impact on the socioeconomic outcomes of the affected cohort of children. Children born after the law change have had worse educational outcomes, a greater likelihood of being unemployed at age 37, and a higher probability of being a teen parent.