An 11-year-old rape victim has been granted an abortion after doctors initially refused to perform the procedure and a judge blocked it.
The girl was 10 when she was raped in Brazil, where abortions are illegal except in circumstances of rape, the mother's life is in danger, or if the fetus has no functioning brain.
Federal prosecutors have today said medical staff at Polydoro Ernani de São Thiago hospital had now taken "measures to interrupt the minor's pregnancy ” after a formal request made on behalf of the girl's family, ABC reports.
Doctors had previously refused to perform the procedure because she was in her 22nd week of pregnancy and said that a decision would have to be made through the courts.
The family's lawyer, Daniela Félix, as well as other legal experts, had said no law in Brazil limits when the procedure can be performed in the case of rape victims, when the mother's life is in danger or the fetus is not viable.
A judge had previously agreed with the doctors and refused to allow the girl to get the abortion, sparking national outrage.
Leaked video from a hearing previously showed judge Joana Ribeiro Zimmer suggesting the girl should "hold on a little more" to save the fetus, The Intercept reported.
Judge Zimmer is going to be investigated for her comments during a hearing with the little girl
Ms Zimmer was also filmed asking the girl if she understood how pregnancies happen.
The girl had repeatedly said she did not want to give birth.
Prosecutor of the Republic Daniele Cardoso Escobar told the superintendent of the university hospital to comply with Brazilian law and allow the abortion, Dinheiro Rural reported.
It was argued that since the law allows abortion in cases of rape, there isn't a restriction on how far along the victim needs to be before terminating and that there is no need for judicial authorisation.
The letter to the hospital said that "patients who seek the health service to carry out pregnancy termination procedures in the event of legal abortion, regardless of gestational age and fetal weight, without any judicial authorisation or police communication."
By the time the girl was able to successfully get an abortion on Wednesday, she was at 29 weeks.
The hospital would not comment on the case.
The country's judicial watchdog agency has since said it would investigate Ms Zimmer over her comments.
Ms Zimmer said the hearing was "illegally leaked" and wouldn't speak on the case as a matter of protecting the child.
Anti-abortion activists in the country argue there should be a 20-to-22-week limit on the procedure.
The case sparked a national conversation between supporters of far-right President Jair Bolsonaro and those of leftist former President Luiz Inácio Lula da Silva.
Bolsonaro, who is in a bid for reelection against da Silva, tweeted after news of the girl's abortion emerged: “A baby of a seven-month pregnancy.
“We don't discuss the way it was conceived, whether the law allows it or not. It is inadmissible taking the life of this defenceless being!”
In April, da Silva said anyone should be allowed to have an abortion, but then changed his stance, explaining he opposes abortions but that women should be allowed the choice.