Santos came from behind to beat Figueirense 3-1 and move away from the lower reaches of Brazil's Campeonato.
Both teams had a player sent off in the first half, with Santos losing Junior Juan in the 11th minute and Tulio seeing red for the hosts five minutes before half-time.
Rodrigo Fernandes gave Figueirense, the bottom club, the lead in the 49th minute - but Santos responded in style.
Neymar equalised within four minutes and goals inside the last 13 minutes from Bruno Peres and Henrique Ganso won it for the visitors.
Fifth-placed Internacional slipped up at Corinthians, going down to a 69th minute goal from Paulo Andre.
There was a dramatic finish in the day's other game, where third-placed Vasco da Gama and struggling Coritiba shared four goals. Junior Urso gave the visitors the lead but Felipe equalised four minutes into the second half and Wendel appeared to have won it for Vasco a minute from time - only for Everton Ribeiro to level in the final minute.