Douglas Ruas fell just short of an outright win over Eduardo Paes, but a pending legal decision over Anthony Garotinho's annulled votes could still hand him the state.
A late intervention by the electoral court's president overturned a disqualification hours before polls opened, leaving the final decision to the full bench.