(AP) -- Brazil's supreme court has voted to authorize abortions in cases of fetuses with no brains.

Abortion is illegal in Brazil except when a threatens the life of the mother and in cases of rape. The Supreme Federal Tribunal's 8-2 vote Thursday now decriminalizes abortions involving anencephalic fetuses.

Such develop without brains and cannot survive outside the womb for more than a few minutes. Most die before birth. Brazil has a high rate of such cases, with 10 out of every 10,000 pregnancies.

Brazil is the world's most populous Roman Catholic country and religious groups staged vigils outside the court and in other cities opposing a ruling to allow such abortions.