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

A Tennessee woman who spent more than a year in jail after being accused of trying to end her own pregnancy with a coat hanger pleaded guilty to a lesser charge in exchange for her immediate release, according to officials and advocacy groups.

Anna Yocca, 32, pleaded guilty to "attempted procurement of a miscarriage" on Monday after spending one year and one month in prison while awaiting trial in a case where she was initially charged with attempted murder, the National Advocates for Pregnant Women, an advocacy group that advised Yocca’s lawyers, announced Tuesday.

She was released from the Rutherford County Adult Detention Center on Monday at 9:10 p.m. local time (10:10 p.m. ET), according to the Rutherford County Sheriff's Office.

Anna Yocca. Rutherford County Sheriff's Office

The original arrest report from the Murfreesboro Police Department in Tennessee accuses Yocca of filling a bathtub with water and attempting to self-abort her pregnancy in Sept. 2015. Yocca became concerned with her safety because of all the bleeding, the report said, and her boyfriend drove her to a local hospital.

After seeking help at the hospital, Yocca voluntarily underwent cesarean surgery and gave birth to a premature baby who has since been adopted, according to a statement from NAPW.

Prosecutors in the state indicted Yocca for attempted murder in Dec. 2015 for allegedly using a coat hanger to end her 24-week pregnancy last September.

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

Yocca’s bond was set for $200,000, which she was unable to pay and thus remained in jail awaiting her trial, the NAPW said.

Related: Texas Makes New Move to Cut Off Planned Parenthood

“What these kinds of arrests do is it will discourage people from seeking help,” Lynn Paltrow, the executive director for NAPW, told NBC News.

In February of 2016, a judge dismissed the attempted murder charge, according to the statement. Yocca was then charged with aggravated assault last spring.

Related: Ohio's 20-Week Abortion Ban Signals More Restrictions Ahead

In November, she was charged with three felonies: aggravated assault with a weapon, attempted criminal abortion and attempted procurement of a miscarriage, the NAPW said. She faced between six and 24 years in jail.

"They have brought several different versions of charges against her and so I think that it is a strong indication of unfortunately how our criminal justice system is broken," Allison Glass, state director for reproductive rights advocacy group Healthy and Free Tennessee told NBC News.

Yocca was sentenced to one year in prison on Monday and was granted time served, Glass said.

Related: Supreme Court Strikes Down Strict Texas Abortion Law

A message left with the office of Hugh Ammerman, the Rutherford County assistant district attorney prosecuting the case, was not immediately returned Tuesday afternoon.

Paltrow said the case highlighted the various ways prosecutors can try to punish women for the outcomes for the pregnancies.

“I think given the enormous discretion prosecutors have and the enormous number of laws to choose from to intimidate and incarcerate pregnant women, this is not a surprising outcome,” Paltrow said.