An Indiana case that raised concerns from women’s advocates about whether feticide laws could be used against women who had abortions came to an end on Wednesday.

A judge said that Purvi Patel, an Indiana woman whose feticide conviction was overturned earlier this summer, should be released from jail immediately, the Associated Press reported. Patel was arrested in 2013 after she allegedly induced her own abortion with drugs purchased online, delivered a premature baby that later died, and placed the child’s body in a trash can.

In 2015, Patel was convicted of feticide and child neglect and sentenced to 20 years in prison. Patel is believed to be the first woman in the U.S. to have ever been charged, convicted and sentenced for feticide for attempting to end her own pregnancy.

Follow Motto on Facebook.

Patel appealed the conviction in October 2015. The National Advocates for Pregnant Women and 26 other organizations and experts filed friend-of-the-court briefs supporting Patel’s appeal, arguing that the ruling could set a precedent to use feticide laws to punish the state’s women for having abortions.

In July, Indiana’s court overturned Patel’s feticide sentence, while upholding her child neglect sentence. The court also downgraded her 20 year sentence to 18 months, saying that the state’s feticide laws weren’t intended “to prosecute women for their own abortions.”

Last week, Indiana’s attorney general said he wouldn’t appeal Patel’s new sentence. On Wednesday, St. Joseph Superior Court Judge Elizabeth C. Hurley said Patel should be released immediately since she had already served more than 18 months.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Samantha Cooney at samantha.cooney@time.com.