An 11-year-old girl who became pregnant after she was raped has finally received a legal abortion after being blocked for weeks by a judge in Brazil.

The child, who was 10 when she was raped, was in her 29th week (month seven) when the abortion was finally performed on Wednesday night, amid outrage against judge Joana Ribeiro Zimmer for her actions in the case.

Brazil’s judicial watchdog agency said it would investigate Ms Zimmer for asking the child at a filmed hearing on May 9 whether she understood how pregnancies happen and suggesting the girl should “hold on a little more” to save the foetus.

IV solution in a child's patients hand,Close up Children patient's hand receiving iv saline solution in hospital
The judge initially refused the 11-year-old girl’s request for an abortion (Alamy/PA)

The girl repeatedly said she did not want to give birth.

The case had ended up before the judge after doctors refused to perform the procedure because the child was in her 22nd week of pregnancy. Ms Zimmer had subsequently sided with doctors and refused the child’s request.

On Thursday, federal prosecutors in the southern Brazilian state of Santa Catarina said that after a formal request was made on behalf of the girl’s family, Polydoro Ernani de Sao Thiago hospital had taken “measures to interrupt the minor’s pregnancy”.

The case, reported by the website The Intercept Brasil last week, prompted associations of magistrates and human rights groups to ask that Ms Zimmer be removed from her post.

Motion blurred photograph of child patient on stretcher or gurney pushed at speed through hospital corridor by doctors and nurses
The child was in her 29th week of pregnancy when the abortion was finally performed (Alamy/PA)

Some anti-abortion activists have argued that Brazil’s health ministry recommendations urge a 20- to 22-week limit on the procedure.

But Daniela Felix, a lawyer for the family of the child, and other legal experts said Brazilian law makes no mention of a limit in the case of rape victims or when a woman’s life is in danger.

Ms Zimmer said in a statement on Wednesday that she “will not speak about parts of the hearing, which were illegally leaked”. She also said she will remain silent about the case “to assure the due and full protection to the child”.

The probe on Ms Zimmer’s methods will be conducted by the same Santa Catarina court system in southern Brazil and its decision will be referred to her own court in the southern state, and then taken for the national watchdog to make its final decision.