Lena Dunham thanks fans following total hysterectomy

Lena Dunham Image copyright PA

Lena Dunham has thanked fans for their support after she revealed she had undergone a total hysterectomy.

The Girls star had the procedure to treat endometriosis - a condition that can cause chronic pain, heavy periods, painful sex and depression.

In a post on Instagram she said: "Your body failing you is a loss that's hard to explain and yet the amount of messages I've gotten from women in a similar predicament has been so overwhelming, loving and heartening."

Endometriosis affects one in 10 women and there is no cure.

One of the options for treatment is to have a hysterectomy - an operation to remove the womb.

Although a hysterectomy is "not a cure for the whole disease," a doctor told Newsbeat this week.

In the post, she added: "I have a broken heart and I hear those don't mend overnight, but we are linked forever by this experience and our refusal to let it hold any of us back from even the grandest dreams."

The actress revealed she'd had the operation in an essay for US Vogue earlier this week.

The 31-year-old explained she had decided to have it after years of pain caused by endometriosis.

A hysterectomy is a surgical procedure to remove the womb (uterus) and it can help ease the symptoms.

In a series of Tweets she also added: "My illness & choice was just that: MY choice.

"I'm not a doctor and I SURE DON'T CLAIM TO BE, but sharing this piece which delves deeper into the options women have.

"My decision was what was best for me and I hope this helps you make the best decision for you & your health."

During a hysterectomy, the womb is removed and the patient may also have her cervix or ovaries removed, depending on her personal circumstances.

Image copyright Endometriosis UK
Image caption This diagram shows how endometriosis builds up around the fallopian tubes and ovaries

In her original essay for Vogue, Lena said she would also explore adoption.

"I may have felt choiceless before, but I know I have choices now.

"Soon I'll start exploring whether my ovaries, which remain someplace inside me in that vast cavern of organs and scar tissue, have eggs.

"Adoption is a thrilling truth I'll pursue with all my might."

Listen to Newsbeat live at 12:45 and 17:45 every weekday on BBC Radio 1 and 1Xtra - if you miss us you can listen back here

More on this story