Palmeiras retained its top-flight status at the expense of Bahia and Vitoria as the Brazilian Serie A came to a thrilling close.
The three teams were battling to secure 16th place as the curtains were closed on the campaign and Palmeiras's 1-1 draw at home to Atletico PR was enough to ensure it avoided relegation.
That situation did not look a formality at the Allianz Parque when Potiguar put the visitor ahead in the 10th minute.
However, Palmeiras was awarded a penalty in the 19th minute and Henrique held his nerve to level the scores from 12 yards.
Bahia's hopes were extinguished as it let a two-goal lead slip in a 3-2 loss at Coritiba.
Strikes from Henrique and Romulo put the visitor in a promising position after 26 minutes, but Ze Eduardo halved the deficit in the 35th minute.
When Dudu equalised five minutes from the end Bahia's hopes were all but over and Keirrison added further salt to the wounds with a winning goal deep into injury-time.
Vitoria was also sunk by a late goal in its 1-0 defeat at home to Santos.
With the game seemingly heading for stalemate - which would not have been enough to save Vitoria - Thiago Ribeiro scored in the fourth minute of injury-time to consign the host to its fate.
Elsewhere, champion Cruzeiro rounded off its campaign with a 2-1 victory over Fluminense, as Nilton and Marcelo Moreno goals cancelled out Fred's opener, while second-placed Atletico Mineiro drew 0-0 at already-relegated Botafogo.
Sport Recife rounded off its campaign with a 1-0 win at home to Sao Paulo, 10-man Flamengo earned a 1-1 draw at Gremio and a brace from Erik helped Goias defeat Chapecoense 4-2 and climb to 12th.
A late fightback from Internacional saw it beat Figueirense 2-1 and secure the third and final automatic qualifying spot for the Copa Libertadores.
Pablo's 50th-minute opener put the host ahead at the Estadio Orlando Scarpelli, but Rafael Moura levelled with three minutes left on the clock before Wellington Silva grabbed a dramatic winner in the fifth minute of injury-time.
That meant that Corinthians was forced to settle for fourth and a place in the qualifying rounds for the Copa despite its 2-1 win over rock-bottom Criciuma.