A judge has ordered that the woman who was handed a sentence of two decades behind bars for inducing her own abortion should be freed immediately from prison.

Purvi Patel, who was sentenced in April last year in Indiana, is likely to be freed after she was resentenced to less time than she has already spent in prison, as reported by the Associated Press.

St Joseph Superior Court judge Elizabeth Hurley said she should serve 18 months for neglect of a dependent and that she does not have to be placed on parole.

The ruling comes two months after the Indiana court of appeals overturned Ms Patel’s conviction, ruling that the law was not designed to “prosecute women for their own abortions” and since it was passed in 1979, it was only used to prosecute people who attacked pregnant women.

Ms Patel was sentenced to 30 years, with 10 years suspended.

Now 35, the Indian-American woman was arrested in July 2013. She had bought abortion drugs online, according to court records, consumed them and then delivered the premature baby. It died in the home where she lived with her parents and grandparents, northeast of South Bend, Indiana.

Her lawyers said she panicked when she went into labour, as she comes from a conservative Hindu family that disapprove of sex outside of marriage.

Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl Show all 10 1 /10 Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl Brazilian women march in Sao Paulo during a protest following the gang rape of a 16-year-old girl Rex Features Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl There have been calls for protests to end to what campaigners call Brazil's 'culture of rape' after the attack Rex Features Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl An online campaign has been set up in response to the crime, using the hashtag #EstuproNuncaMais, meaning 'rape never again' Rex Features Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl The 16-year-old victim was attacked in a poor neighbourhood in the west of the city on 21 May 2016 Rex Features Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl Two of the attackers posted pictures and video on Twitter of the assault, which has shocked the country Rex Features Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl Brazilian women protest in front of the Candelaria Church in Rio de Janeiro AFP/Getty Images Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl Seven men have been charged in connection with the attack AFP/Getty Images Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl Women's underwear and photos from Brazilian photographer Marcio Freitas displayed on Copacabana beach during a protest by non-governmental organization Rio de Paz (Rio of Peace) against rape and violence against women REUTERS Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl Women's underwear smeared with paint is seen during a protest against rape and violence against women in Brasilia, Brazil REUTERS Feminist protests demand end to violence against women in Brazil after gang rape of teenage girl Demonstrators attend a protest against rape and violence against women in Brasilia, Brazil REUTERS

She put the body in a rubbish bin behind her family’s restaurant. When she went to the emergency room, bleeding heavily, she at first denied the pregnancy, but later admitted she had a miscarriage and had thrown away the body.

Prosecutors alleged she was at least 25 weeks pregnant, while Sue Ellen Braunlin, doctor and co-president of the Indiana Religious Coalition for Reproductive Justice, said she was most likely between 23 and 24 weeks pregnant.

Ms Patel claimed she gave birth to a stillborn, while prosecutors argued the baby died within seconds of being born.

Indiana’s feticide laws include making women pay for the funeral costs of their miscarried babies or fetuses that have been aborted.

Her arrest was the first time in the state, governed by Donald Trump’s running mate Mike Pence, and in the US as a whole that a woman had been sentenced to imprisonment for a self-induced abortion.

But she was not the first woman to be charged.