lena dunham
Actress Lena Dunham poses at the Hollywood Reporter's Annual Women in Entertainment Breakfast in Los Angeles, Dec. 9, 2015. Reuters/Danny Moloshok

Lena Dunham, creator and star of the hit HBO show “Girls,” was hospitalized Saturday and will have to undergo surgery before being released, according to People Magazine. Dunham's spokeswoman Cindi Berger told the publication that she was hospitalized for a ruptured ovarian cyst.

“Lena Dunham has been very public with her personal bouts with endometriosis. This morning, she suffered from an ovarian cyst rupture and has been taken to the hospital,” Berger said in a statement to the magazine. “Lena will be undergoing surgery at an undisclosed hospital. We thank you for you understanding and hope that Lena's privacy will be respected.”

Dunham announced in February that she was taking time off from the promotional tour for season five of “Girls,” describing how she suffers from endometriosis, a condition that can cause severe pelvic pain, typically in women in their 30s and 40s.

“As many of you know I have endometriosis, a chronic condition that affects approximately 1 in 10 women's reproductive health,” Dunham wrote in a Facebook post. “I am currently going through a rough patch with the illness and my body (along with my amazing doctors) let me know, in no uncertain terms, that it's time to rest. That's a hard thing to do, but I'm trying, because all I want is to make season 6 of Girls the best one yet. I'm lucky enough to have support and backup from Jenni, Judd and the whole Girls gang. So many women with this disease literally don't have the option of time off and I won't take it for granted.”

The disorder is difficult to diagnose but affects as many as 5 million women in the U.S., according to the National Institute of Health. The painful condition causes endometrium, which is supposed to line the inside of the uterus, to grow outside the uterus often on bowels, ovaries or in the pelvic region. People Magazine reported that it was unclear how long Dunham would be in the hospital.