Brasilia – Brazil's Supreme Federal Tribunal ruled that aborting a fetus suffering from anencephaly - the absence of a large part of the brain and the skull - is not a criminal offense.
Only two of the 11 justices voted against decriminalization, while another recused himself because he had previously argued the case while serving as a state attorney general.
One of the two "no" votes was cast by Chief Justice Cezar Peluso, who predicted the decision would lead to a "massacre" of anencephalic fetuses.
Until now, Brazil has permitted abortions only in cases of rape or a threat to the life of the mother.
A woman who terminates a pregnancy under any other circumstances faces up to three years in prison, while the doctor who performs the procedure can be jailed for four years.
Chief federal prosecutor Roberto Gurgel presented to the court an advisory document in support of decriminalizing abortion in cases of anencephaly.
The high court's ruling came in response to a suit filed in 2004 by the National Confederation of Health Workers, which said that denying the option of termination to a woman carrying an anencephalic fetus violated the mother's right to dignity.