Sexually transmitted infections cause ectopic pregnancies.