Ectopic pregnancy occurs when a fertilized egg implants outside of the uterus, usually in the fallopian tubes. Risk factors include previous pelvic infections caused by bacteria like Chlamydia and gonorrhea, as well as a history of prior ectopic pregnancy or tubal surgery. Clinical features may include abdominal pain, vaginal bleeding, and shoulder pain. Diagnosis is confirmed through ultrasound and beta-hcg blood tests. Treatment depends on whether the tube has ruptured, but may include surgery or medication with methotrexate. Differential diagnoses include threatened or incomplete abortion, corpus luteum cyst, infections like salpingitis, and appendicitis.