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

The Indiana Court of Appeals has overturned the feticide conviction of a woman found guilty of killing her premature infant by taking abortion-inducing drugs.

The ruling issued Friday comes in the case of Purvi Patel, who was convicted of neglect and feticide last year. However, the court upheld a lower-level felony neglect of a dependent conviction.

Purvi Patel was sentenced to 20 years in prison in 2015, two years after her self-induced abortion at her family's home. Women's advocacy groups have been heavily involved in the case, saying it marks the first time a state feticide law was used against a woman because of an alleged self-induced abortion.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

The appeals court ruled that the state Legislature didn't intend for the feticide law "to be used to prosecute women for their own abortions."

RELATED: Court to Hear Appeal From Purvi Patel, Convicted of Feticide

Patel was arrested when she sought treatment at a local hospital for profuse bleeding after delivering a one and a half-pound boy in a bathroom and putting his body in a trash bin behind her family's restaurant. Court records show she bought abortion-inducing drugs from an online pharmacy based in Hong Kong.

An excerpt of a decision by the Indiana Court of Appeals revoking the 2015 feticide conviction of Purvi Patel. Court of Appeals of Indiana

Patel, who was 32 at the time, used the drugs because she feared her family would discover she had been impregnated by a married man, according to documents. Patel lived with her parents and grandparents in Granger, a city just northeast of South Bend along the Michigan border.

RELATED: Opinion: Purvi Patel's Case Is Part of an 'Unjust Pattern’

Attorneys for Indiana argued that Patel was at least 25 weeks into her pregnancy. They said her infant was just beyond the threshold of viability and took at least one breath before dying.

The attorneys also argued that Indiana's feticide law could apply to pregnant woman, not just "to third-party actors," and that Patel hadn't shown the feticide law constituted an undue burden on the right to an abortion.

Follow NBC Asian America on Facebook, Twitter, Instagram, and Tumblr.

RELATED