LOS ANGELES — Lena Dunham has written an incredibly personal essay about coming to terms with permanent infertility at age 31.

Vogue.com published Dunham’s detailed account Wednesday of her decision to undergo a hysterectomy late last year to relieve what she describes as debilitating pain from endometriosis.

The award-winning creator of “Girls” and LennyLetter.com also shares her profound desire to experience pregnancy and become a mother and her grief around losing her fertility. She says dealing with endometriosis distanced her from her romantic partner. Dunham and musician Jack Antonoff announced in January that they had ended their five-year relationship.

Dunham shared that the operation came at the end of a 12-day hospital stay that she entered in chronic pain and, after one unsuccessful surgery and seven hours spent in simulated labor to provoke uterine contractions, culminated in her choice to have a hysterectomy.

“It’s been a few months now,” she wrote. “Despite some small complications (please remember to drink lots of water; that’s my only advice) I am healing like a champ. I have a limp, the result of a pinched nerve in my pelvis, but I rock it like the new Balenciaga boots I bought myself as a push present. My mind, my spirit, are another story. Because I had to work so hard to have my pain acknowledged, there was no time to feel fear or grief. To say goodbye. I made a choice that never was a choice for me, yet mourning feels like a luxury I don’t have.”

Dunham says she has known all her life that “something is wrong with my uterus” and has had nine surgeries to cope with endometriosis since her diagnosis 10 years ago.

Associated Press; Contributing: USA TODAY