Several factors can increase the risk of an ectopic pregnancy, including a history of pelvic inflammatory disease (PID), previous ectopic pregnancies, surgeries on the fallopian tubes, or certain fertility treatments. Smoking and advanced maternal age are also potential risk factors.