Copa America hosts Brazil saw their 10-game winning run come to an end as they drew 1-1 with Ecuador in Goiania.
The point took Ecuador into the quarter-finals, with holders Brazil having previously booked their place in the knockout stages.
Eder Militao headed Brazil into the lead from Everton Soares' free-kick for his first international goal.
But Angel Mena rifled home from Enner Valencia's flick-on to equalise and send Ecuador through.
Mena was a first-half replacement for injured Brighton midfielder Moises Caicedo.
Ecuador had only needed to match Venezuela's result against Peru - who had already qualified - in Sunday's other game.
Andre Carrillo scored the only goal in that encounter as Peru won 1-0.
Both Brazil - who had won every game since November 2019 - and Ecuador must wait until Group A is over before discovering their quarter-final opponents. Only two of the 10 competing teams go out at the group stages.
On Monday in Group A (01:00 BST on Tuesday), Bolivia face Argentina and Uruguay play Paraguay.