Is abortion permitted in the case of an ectopic pregnancy?

Is abortion permitted in the case of an ectopic pregnancy?