When actress and author Lena Dunham went public about having endometriosis, a disorder of the uterus, she wanted to make something clear: The pain it causes can be completely debilitating, and women desperately need better treatments.

Soon, it seems, women like Dunham with endometriosis pain will have a new option for relief. An endometriosis pain treatment was just approved by the Food and Drug Administration, and it’s expected to arrive at pharmacies as soon as August. The pill, called elagolix (brand name Orilissa), from the drugmaker AbbVie, is the first FDA-approved oral treatment in more than a decade for the moderate to severe pain that comes with endometriosis.

“This [medication] could really be transformative,” said Hugh Taylor, an OB-GYN at Yale Medical School who led the key trials testing the drug.

Endometriosis is one of the most common gynecological conditions, affecting as many as one in 10 women of reproductive age. And it can be incredibly painful. The reason is simple: Women with the condition are growing excess tissue in their abdomen that they can’t shed.

Every month, a woman’s uterine lining thickens and sheds during her period if she’s not pregnant. With endometriosis, that tissue thickens and bleeds, but it happens outside of the uterus — on the fallopian tubes, or even in the nose or lungs. Because the extra tissue has no way to exit the body (it can’t go through the vagina since it’s not growing in the uterus), it builds up and becomes trapped, leading to pain and, in some cases, infertility.

There’s no cure for endometriosis. To manage symptoms, women are usually prescribed birth control or over-the-counter painkillers as a first-line approach, but they don’t always work. In severe cases, a doctor may suggest “excision surgery” to remove the extra tissue. (Dunham had eight surgeries and ended up getting a hysterectomy, which was considered an extreme measure.)

Enter elagolix. Endometriosis is an estrogen-driven disease, and the drug works by lowering estrogen levels. Two large double-blind, placebo-control randomized trials, which 1,285 women completed, tested whether it can help women control endometriosis pain. The results, published last year in the New England Journal of Medicine, were impressive. The patients in those trials scored their pain from 0 (no pain) to 3 (severe pain). On average, they had pain levels of 2.2 out of 3 before starting on the drug — and they experienced a 2-point reduction in pain after taking the treatment for three months.

“It’s a major advance,” said Dr. Louis DePaolo, head of the fertility and infertility branch at the National Institute of Child Health and Human Development, “and another option women have that’s effective.”

Now the less good news: The drug won’t cure endometriosis; it’ll only tamp down the pain it causes. Many women in the trial experienced the symptoms of menopause — hot flashes, headache, insomnia — and researchers have also found the drug causes bone loss. We have no idea about the long-term effects of taking the drug because there are no trials lasting for longer than a year, or how it stacks up against other painkillers (since the trials only compared it to placebo). That’s not to mention cost: The drug’s price is listed at $850 per month. But for some, the risks and costs may be worth it. Here’s why.

Endometriosis is incredibly common — but it can go undiagnosed for years

Endometriosis is a chronic, sometimes highly disruptive condition. The three main ways it manifests are through pelvic pain, infertility, and pelvic masses such as cysts, scar tissue, and fibroids. According to the American College of Obstetricians and Gynecologists, some important signs of endometriosis include:

Pain before and during periods

Pain during sex

Infertility

Fatigue

Painful urination during periods

Painful bowel movements during periods

But many women don’t know they have endometriosis. It’s sometimes mistaken or dismissed for regular period pain. Definitively diagnosing the disorder requires invasive surgery; doctors need to peer inside the pelvis through a laparoscopy. (Imaging is rarely helpful in getting a clear diagnosis.) This involves making a small incision in the belly and inserting a tube with a tiny camera to see if the pelvic organs show signs of tissue scarring and buildup. So it’s no surprise it takes between three and 11 years after the onset of symptoms to diagnose endometriosis.

Doctors aren’t sure why some women get it

Adding to the mystery around endometriosis: No one knows exactly what causes it, but doctors have some theories.

Retrograde menstrual flow: During a period, when a woman is shedding her uterine lining, some of that tissue can flow through her fallopian tubes and into her pelvis, which researchers think may cause endometriosis. But doctors have also found that the rate of retrograde menstruation is about the same in women with and without endometriosis, so they think additional factors spur the disorder in some.

During a period, when a woman is shedding her uterine lining, some of that tissue can flow through her fallopian tubes and into her pelvis, which researchers think may cause endometriosis. But doctors have also found that the rate of retrograde menstruation is about the same in women with and without endometriosis, so they think additional factors spur the disorder in some. Genes: The disorder runs in families, so doctors believe there’s a genetic component. If a woman’s mom or sister had endometriosis, the woman is believed to be at a higher risk.

The disorder runs in families, so doctors believe there’s a genetic component. If a woman’s mom or sister had endometriosis, the woman is believed to be at a higher risk. Somatic mutations: Researchers are also finding that somatic mutations — acquired changes to DNA that happen after a person is born — may also be an endometriosis driver.

Researchers are also finding that somatic mutations — acquired changes to DNA that happen after a person is born — may also be an endometriosis driver. Immune system dysfunction: Problems with the immune system can hamper a woman’s ability to clear her menstrual debris, leading to endometriosis.

Problems with the immune system can hamper a woman’s ability to clear her menstrual debris, leading to endometriosis. Environmental factors: There’s some evidence to suggest environmental exposures to certain chemicals may contribute to one’s risk of developing endometriosis.

The treatments available don’t always help, and some have severe side effects

When birth control pills or over-the-counter painkillers fail to help endometriosis pain, women are often left choosing between a monthly injection called Lupron Depot, which can put women into a profoundly menopausal state, or Danazol, a male hormone that often causes acne and facial hair growth.

In women for whom these drugs aren’t effective, or who don’t want to take medications, surgery to remove the displaced endometrial tissue can be a highly effective option. But the trouble with surgery is that endometriosis can recur, so women may need more surgeries. The success of surgery also depends on finding a skilled and experienced surgeon, and there’s always the risk of surgical complications.

The new drug elagolix is not risk-free, either. In the trials, women who took the drug had greater bone loss than did those who received placebo, and this wasn’t entirely surprising. Like other endometriosis treatments, the drug works by lowering estrogen levels (since endometriosis needs estrogen to grow). When that happens, women experience menopausal side effects. The most common in the trials were hot flashes, headaches, and insomnia. (Elagolix is available in two doses — 150 mg per day, or 200 mg twice daily — and the women on the higher dose experienced the side effects more frequently.) Mood swings and night sweats were less common, and one woman in the trial died by suicide (though there’s no indication that the medicine was a cause of her death).

DePaolo pointed out, “[Elagolix] doesn’t have the pronounced side effects some of the other compounds have.” That’s because, he said, it doesn’t drive down estrogen levels as severely.

But for patients who have tried other estrogen-lowering medicines, elagolix isn’t all that appealing. “This drug is palliative in nature. It does not cure or shrink the disease,” Casey Berna, director of programs and partnerships for the advocacy group EndoWhat. The drug’s side effects also concerned her, as did the lack of knowledge about its long-term impact.

For other women, though, the trade offs may be worth it. But in either case, women with severe endometriosis are still left choosing between terrible pain, surgery, or drugs with serious side effects.