A Florida mother who battled for years against her child's father over the boy's circumcision ended Friday by agreeing to the procedure in exchange for her release from jail.

In a remarkable turnaround 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 signed paperwork giving approval for the surgery, recoiling in tears and clasping her shackled hands after it was done.

The shift, though under duress, threatened the hero status given to Hironimus by a bubbling movement of anti-circumcision advocates who have followed the case's every turn.

Scroll down for video

Heather Hironimus, sitting with her attorney Thomas Hunker, broke down as she signed consent for her 4-year-old son to be circumcised, during a hearing on Friday in Delray Beach, Florida

Hironimus was told she would remain in jail indefinitely if she did not comply with the court ruling over her son's circumcision

Heather Hironimus, left, recoiled in horror after signing the agreement alongside her attorney Thomas Hunker

She remained jailed on Friday afternoon, but her release was likely later in the day.

Attorneys for both Hironimus and the boy's father, Dennis Nebus, declined to comment, citing an ongoing gag order in the case.

Georganne Chapin, executive director of Intact America, which advocates against circumcision, said Hironimus had been 'bullied' into signing, calling it the 'saddest commentary on the court'.

'I don't know what's in his head,' she said of Judge Jeffrey Gillen, who presided over the case. 'I don't know how he can sleep at night.'

Hironimus and Nebus had initially agreed to the circumcision in a parenting agreement filed in court, but the mother later changed her mind.

Circuit and appellate judges sided with the father, but potential surgeons backed out after failing to get the mother's consent and becoming the target of protesters.

Hironimus went missing with the boy in February, ignoring warnings from Gillen to be in court and allow the circumcision to proceed.

The mother has been warring with the child's father, who wants the circumcision and appeared distraught when she lost her battle today

The mother previously said she wanted to protect her child and was 'scared to death' by the procedure

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 state court.

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

Upon arriving in courton Friday, chained at the wrists and ankles and wearing a navy blue jail jumpsuit, Hironimus quietly invoked her Fifth Amendment rights when asked whether she had signed the consent agreement.

Gillen said Hironimus would be jailed indefinitely unless she did.

Her mother, Mary Hironimus, fought back tears but said her daughter was right to fight for her son.

'Of course it's worth it,' she said, 'any mother would do anything for her child.'

The child's father Dennis Nebus (pictured right) sits in court with his lawyers May Cain and William Snihur Jr., in March

Hironimus still faces a criminal charge of interfering with child custody. Gillen approved a motion by Nebus' attorney, May Cain, to temporarily give the father sole decision-making over matters including his son's health and to travel out of state, if needed, to have the circumcision performed. Cain said her client had been receiving death threats and warnings his son would be kidnapped.

'I am fearful that the child might be abducted,' Gillen said.

After Hironimus agreed to sign the form and court reconvened, Gillen offered advice to the parents: 'You are both going to continue to be the parents to this young man. You're going to have to learn how to deal with that in an amicable, friendly, civil manner.