Goiania: An Ecuador side fighting to keep their Copa America hopes alive managed to hold a previously perfect Brazil -- playing without a resting Neymar -- to a 1-1 draw Sunday and reach the quarter-finals.
Peru meanwhile defeated Venezuela 1-0 in the other Group B match to send the Covid-decimated "Vinotinto" team packing from the South American championships.
Seeking to extend a 10-match winning streak, Brazil came out pressuring in Goiania on the group's final match day.
Coach Tite opted to rest Paris Saint-Germain star Neymar, but the "Selecao" still dominated the first half.
A free kick in the 37th minute set up Eder Militao, who headed the ball at a sharp angle into the top right corner of the net, well clear of Ecuador keeper Hernan Galindez's outstretched arm.
But facing the specter of an early exit, Ecuador came out fighting in the second half.
They got the equalizer in the 53rd minute, as Brazil tried to clear a corner kick.
Enner Valencia managed to head it back the other way, setting up Angel Mena, who sprinted in to fire the ball past Brazil's Alisson.
"We played a good first half where we managed to impose our style of play. The first half was much better than the second," said Brazil defender Marquinhos.
"Now we're in the decisive part, the knock-out stage, so we have to work on playing our best football for the full match."
Peru meanwhile finished the group stage on a high note after a spectacular turnaround.
The Incas opened the tournament with a 4-0 thrashing by Brazil.
But they went on to defeat Colombia, then battle back from 2-0 down against Ecuador Wednesday to secure a draw.
They added three more points Sunday thanks to Andre Carrillo, who capitalized on Venezuela's clumsy failure to clear a corner in the 48th minute in Brasilia.
"Peru shouldn't give up what we've been working on. I think we've shown our ability to fight back throughout the Copa America," said Argentine coach Ricardo Gareca.
Brazil finished the group stage as heavy favourites with 10 points from four matches -- three points clear of runners-up Peru in Group B.
Colombia finished third with four points and Ecuador fourth with three.
Venezuela joined Group A side Bolivia as the two teams eliminated from the group stage.
Group A have one more round of matches Monday, when Uruguay play Paraguay and Bolivia face Argentina.
With the final eight already decided, the real stakes will be deciding whether Chile or Uruguay face defending champions Brazil in the quarter-finals.