A Florida woman's battle to avoid having her 4-year-old son circumcised ended Friday when she agreed to the procedure in exchange for her release from jail, in a decision called unjust by anti-circumcision activists.

After a week behind bars for contempt and an initial hearing in which she was ordered to remain jailed, court reconvened and a sobbing Heather Hironimus, 31, signed paperwork giving approval for the surgery, recoiling in tears and clasping her shackled hands after it was done. She was expected to be released from jail later Friday.

Upon arriving in court Friday, Hironimus quietly invoked her Fifth Amendment rights when asked if she had signed the consent agreement. Judge Jeffrey Gillen, whom Hironimus appeared before on Friday, said she would be jailed indefinitely unless she did, something decried by Georganne Chapin, the executive director of Intact America, an anti-circumcision advocacy group.

"It was pure bullying. It was pure coercion, pure revolting misogyny on the part of this judge to give [this mother] the choice between jail indefinitely or supposedly agreeing to sign a form allowing somebody to cut off a perfectly normal, perfectly healthy part of her child’s body," Chapin said.

Attorneys for Hironimus and the boy's father, Dennis Nebus, declined to comment, citing a gag order in the case. Hironimus and Nebus, who are not married, initially agreed to the circumcision in a parenting agreement filed in court, but she later changed her mind, leading to lengthy litigation.

Circuit and appellate judges sided with the father, but potential surgeons backed out after failing to get the mother's consent and drawing protest from anti-circumcision activists, who call themselves "intactivists."

"The kid’s penis is not threatening the child or anybody else. The standard by which parental consent is valid in bioethics … is that the condition or illness threatens the child’s life or health. A foreskin is not an illness," said Chapin.

Hironimus went missing with her son in February, ignoring warnings from Gillen to be in court and allow the circumcision to proceed. She remained missing until her arrest last week, staying in a domestic violence shelter. With her legal options dwindling, she filed a federal civil rights lawsuit on behalf of her son, looking for a solution outside of state court.

But her attorney abruptly withdrew that case Wednesday, two days after its first hearing, when a federal judge expressed open skepticism of its merits.

Medical opinion over circumcision remains divided. In 2012 the American Academy of Pediatrics said that evidence indicates that the “health benefits of newborn male circumcision outweigh the risks.” While the procedure is quite common in the U.S., it is much less so in other parts of the world — only about 30 percent of men globally are circumcised. In the U.K., the British Association of Paediatric Surgeons advises that there is rarely a medical need for circumcision, and doctors are told that they can refuse to perform the procedure for reasons of conscience.

Meanwhile, Gillen told both parents Friday, "You're going to have to always take into consideration what's in your child's best interest."

"To the extent that you may differ on things, you're going to have to talk them out. That's what parents do in a civilized society. You do not take the law into your own hands," he said, referring to Hironimus disappearing with her child.

Al Jazeera and The Associated Press. Philip J. Victor contributed to this report.