A candidate for mayor in Brazil's local elections has been told she cannot run for office because she is in a same-sex relationship with the outgoing mayor.
By Steve Kingstone
BBC, Sao Paulo
The landmark decision was announced on Friday by the country's higher electoral court.
Under Brazilian law, mayors cannot be followed in office by relatives, to avoid allegations of nepotism.
The decision is part of a trend which has seen same-sex relationships become increasingly acknowledged by courts.
In a unanimous decision, the court annulled the candidacy of Eulina Rabelo, who was running for mayor in the small town of Viseu in northern Brazil.
The court said she was maintaining a homosexual relationship with the outgoing mayor, Astrid Cunha e Silva.
It said the relationship was stable and should therefore be treated the same as a heterosexual partnership.
This is the first ruling of its kind and it comes as the country prepares to go to the polls on Sunday.
Ms Rabelo can appeal against the decision. Earlier, her lawyers argued that the relationship between the two women was based on friendship and an affinity of political ideas.
The court's decision is part of an emerging trend which has seen same-sex relationships become increasingly acknowledged by the courts.
Although Brazilian law does not permit gay marriage, judges have recognised homosexual partnerships when ruling on the issue of pension rights.