Surgery plays an important role in the treatment of endometriosis. While medical therapy can help manage pain and infertility associated with endometriosis, surgery is often necessary. The document discusses several indications for surgery, including when medical treatment is declined, not effective, or has contraindications. It also outlines the role of surgery in diagnosing and treating deep endometriosis, which can involve organs and cause significant morbidity without surgical removal. Advanced imaging helps plan surgical treatment of deep lesions. The benefits of a single surgery that both diagnoses and treats endometriosis are discussed over multiple surgeries. Effective surgical treatment of endometriosis requires experienced surgeons and proper equipment and facilities.