Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

HUNTINGBURG, Ind. — What would you do if your child had a serious illness and the only treatment that would stop her pain was illegal?

Two-year-old Jaelah Jerger has epilepsy, and as a baby her tiny body was wracked with up to 30 seizures a day. Her parents tried a drug approved by the Food and Drug Administration, but it didn't work.

"Every time she has a seizure," said her dad, Jade Jerger, his voice catching, "to me it's like watching part of her life slip away."

"Helpless doesn't begin to describe [how it feels]," said her mother, Lelah.

The Jergers decided to try a remedy they'd learned about on the internet, an extract from the cannabis plant called cannabidiol, or CBD. Advocates of the oil say it can help with schizophrenia, anxiety, cancer — and epilepsy.

According to the Jergers, CBD's impact was immediate. Within a week, Jaelah's seizures were largely gone. It was the miracle they'd dreamed of.

But then they told their medical team in Indianapolis what they'd done, and the next thing they knew, Child Protective Services (CPS) was knocking at their door.

Jaeleh Jerger suffering from a seizure. Courtesy Jerger family

"They were going to take her," said Jade.

State marijuana laws are changing across the nation — some states have legalized recreational marijuana, and 30 states and the District of Columbia have legalized medical marijuana.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Seventeen states, including Indiana have CBD-specific laws that make its use legal in some medical circumstances. But Indiana's law didn't yet allow its use for children with Jaelah's form of epilepsy.

When the Jergers' story went public, Indiana's attorney general wrote an opinion piece in The Indianapolis Star reaffirming that their use of CBD oil was illegal.

"[A]s a matter of legal interpretation," said the article, "products or substances containing cannibidiol remain unlawful in Indiana as well as under federal law."

Authorities seemed to be asking the Jergers to choose between letting their daughter suffer or breaking the law and possibly losing custody.

The Stanley Brothers

The Jergers ordered their CBD online from the Stanley Brothers, a company run by a group of brothers who grow cannabis in greenhouses in the mountains of Colorado, where recreational weed is legal.

Joel Stanley said he believes that his firm's version of CBD oil is legal everywhere in the U.S. It contains very little THC, the chemical that gets users high. The company maintains that its product is a dietary supplement, not a recreational drug — and that it is extracted from legally grown hemp.

"The way my little brother puts it," said Stanley, "you could smoke a joint the size of telephone pole and not get high."

Stephanie Gosk speaks to Joel Stanley, of Stanley Brothers, a company run by a group of brothers who grow cannabis in greenhouses in the mountains of Colorado. NBC News

He recognizes, however, that CBD is also not an FDA-approved drug. He says it would take "billions of dollars" to conduct the testing necessary for government approval.

"But more importantly," said Stanley, "it would take nine, 10, 12, who knows how many years to get that product through the drug approval process."

Dr. Staci Gruber, a researcher at Harvard Medical School, has been studying cannabis for 20 years. She says little official research into CBD's medical uses has been done because of its status as a Schedule I drug, like heroin, cocaine or ecstasy.

"It would have to be approved by the [Drug Enforcement Administration] for you to do that study in a clinical trial model," she explained.

Said Gruber: "I don't know that I have terms to describe how much opportunity there is with regard to exploring CBD. I think there is limitless potential in a lot of different areas."

The head of the National Institute on Drug Abuse, Nora Volkow, testified to a Senate caucus in 2015 that "preliminary data suggest [CBD] may have therapeutic value for a number of medical conditions."

In a statement to NBC News, the DEA said it does not distinguish between the Stanley's plants and marijuana, and that CBD falls "within the definition of marijuana under federal law."

"It's the hardest thing I've ever had to do"

The state of Indiana dropped its threats to take Jaelah away. The day after NBC News met with the Jergers, the state legislature changed its cannabis law to allow the Jergers to use CBD for Jaelah's form of epilepsy. And on Thursday, an advisory committee to the FDA voted to recommend approval of CBD as a treatment for rare and severe forms of epilepsy.

Lelah and Jade Jerger, with their daughter Jaeleh. NBC News

The Jergers have filed suit against CPS for threatening to take their daughter away. The Indiana attorney general's office and CPS cited the pending litigation in declining to comment for this story.

Jade Jerger says fighting for his daughter's right to CBD was harder on him than his tour of duty in Iraq. Lelah Jerger said: "It's the hardest thing I've ever had to do. But I don't regret it for a second, because we're all Jaelah has."

"We feel like we're fighting for our lives."