Increasing evidence suggests that maternal stress during pregnancy may influence pregnancy outcomes. In a nationwide Swedish study including almost 3 million births taking place during 1973-2006, we investigated whether maternal bereavement during pregnancy is associated with stillbirth risk. Through individual record linkage between several population-based registers, we obtained information on demographic, health-related, and pregnancy-related factors and deaths of mothers' first-degree relatives. There were 11,071 stillbirths (3.8 per 1,000 births) in the cohort. After adjustment for potential confounders, infants of mothers who had lost any first-degree relative the year before or during pregnancy had an 18% higher risk of stillbirth than unexposed offspring (95% confidence interval (CI): 1.06, 1.31). Corresponding hazard ratios were 1.67 (95% CI: 1.18, 2.36) for maternal loss of an older child, 2.06 (95% CI: 1.44, 2.94) for loss of a sibling, and 1.07 (95% CI: 0.95, 1.21) for loss of a parent. The relationship between maternal bereavement and stillbirth did not vary by time of death or by whether the relative's death was expected or unexpected. Death of a close relative is one of the most severe sources of stress, and future studies need to investigate whether less severe but more common stressors also increase stillbirth risk.