Two-time Brazilian Serie A champion Botafogo has been relegated to the country's second-tier competition.
Second-bottom Botafogo - winner of the top division in 1968 and 1995 - was condemned to Serie B after losing 2-0 to Santos at the Estadio Urbano Caldeira in the penultimate round of competition.
The loss - Botafogo's 22nd of the campaign - left Vagner Mancini's men six points adrift of safety with one match remaining.
Leandro Damiao was the hero for Santos, scoring twice in the second half to end the team's seven-match winless streak.
The deadlock was broken three minutes after half-time, with Leandro Damiao curling a low shot past Botafogo goalkeeper Jefferson.
Leandro Damiao completed the scoring in the 90th minute, fumbling his initial effort before firing the ball into the roof of the net.
Bahia kept its survival hopes alive thanks to a narrow 1-0 win at home to slumping Gremio.
Gremio was reduced to 10 men in the 29th minute and Bahia pounced three minutes later with Rafael Galhardo giving the host a much-needed victory.
Bahia - third from bottom - is two points from Palmeiras and safety ahead of the final round.
Palmeiras - one point clear of fourth-bottom Vitoria - was beaten 2-1 by third-placed Internacional.
Vitoria crashed to back-to-back losses, routed 4-0 at Flamengo.
Meanwhile, champion Cruzeiro played out a 1-1 draw at Chapecoense.
Sao Paulo also drew 1-1 against 10-man Figueirense.
In other results, former Brazil striker Fred scored twice as Fluminense powered past fourth-placed Corinthians 5-2.
Coritiba stunned Atletico Mineiro 2-1, cellar-dwelling Criciuma drew 2-2 with Sport Recife and Atletico PR prevailed 1-0 against Goias.