The Mexico City Policy, first announced by US President Ronald Reagan and since lifted and reinstated by presidents along partisan lines, prohibits US foreign assistance to any organisation that performs or provides counselling on abortion. Many organisations affected by this policy are also providers of modern contraception. If the policy reduces these organisations’ ability to supply modern contraceptives, it could have the unintended consequence of increasing abortion rates. We empirically examined patterns of modern contraception use, pregnancies, and abortion among women in 26 countries in sub-Saharan Africa in response to the reinstatement and subsequent repeal of the Mexico City Policy across three presidential administrations (Bill Clinton, George W Bush, and Barack Obama). We combine individual level data on pregnancies and abortions from 743 691 women, country-year data on modern contraception use, and annual data on development assistance for family planning and reproductive health in a difference-in-difference framework to examine relative changes in use of modern contraception, pregnancy, and abortion in response to the policy. We found that when the Mexico City Policy was in effect (2001–08), abortion rates rose among women in countries highly exposed to the policy by 4·8 abortions per 10 000 woman-years (95% CI 1·5 to 8·1, p=0·0041) relative to women in low-exposure countries and relative to periods when the policy was rescinded in 1995–2000 and 2009–14, a rise of approximately 40%. We found a symmetric reduction in use of modern contraception by 3·15 percentage points (relative decrease of 13·5%; 95% CI –4·9 to –1·4; p=0·0006) and increase in pregnancies by 3·2 percentage points (relative increase of 12%; 95% CI 1·6 to 4·8; p<0·0001) while the policy was enacted.