An ectopic pregnancy occurs when a fertilized egg implants and grows outside the main cavity of the uterus. An ectopic pregnancy most often occurs in a fallopian tube, which carries eggs from the ovaries to the uterus. This type of ectopic pregnancy is called a tubal pregnancy.