Pele's former club Santos have been relegated for the first time in their 111-year history following a 2-1 home loss to Fortaleza in the final round of Brazil's Serie A.
The costal city team were one of three clubs, along with Sao Paulo and Flamengo, never to have been relegated from Brazil's top flight but a woeful run of five games without a victory saw them drop to 17th in the standings with 43 points.
America Mineiro, Coritiba and Goias had already been assured of going down from the 20-team division.
City Football Group-owned Bahia secured their top-flight status with a resounding 4-1 win over Atletico Mineiro, while Vasco da Gama stayed out of the drop zone with a 2-1 win over Bragantino on Wednesday (Thursday AEDT).
Santos had looked set to stave off relegation when they drew level at 1-1 with Fortaleza in the second half and with Vasco being held.
However, Serginho's goal for Vasco in the 82nd minute and an added-time goal from Fortaleza's Lucero condemned the three-times Copa Libertadores champions to relegation in front of their frustrated home fans.
At the other end of the table, Endrick, who is set to join Real Madrid in July, scored in the 21st minute to help Palmeiras to a 1-1 draw at Cruzeiro that secured back-to back championships and a record-extending 12th title.
Palmeiras finished with 70 points, two more than Gremio. Botafogo, who led for 31 of 38 rounds, finished fifth with 64 points. The Rio club lost 3-1 at Internacional, ending the season on an 11-game winless streak.
Late Brazilian great Pele helped Santos become one of the most famous clubs in world football, the side enjoying a golden era in the 1950s and 1960s that saw them win 10 state and six Brazilian league titles.
They also lifted the Copa Libertadores, South America's equivalent of the Champions League, in 1962 and 1963, the same years won they won the Intercontinental Cup, the trophy played for by the top teams from Europe and South America.
In addition to Pele, Santos has produced a host of outstanding players such as former AC Milan striker Robinho, Brazil's top scorer Neymar and Real Madrid forward Rodrygo.
Neymar posted pictures of himself watching the match as he recovers from a knee injury.
"We will smile once again," the Saudi Arabia-based Al-Hilal striker wrote after fulltime.
Australian Associated Press