Merida:Peru produced a stunning comeback to reach the Copa America quarterfinals, while Uruguay hobbled into the last eight after both teams drew their Group A matches on Tuesday.
Peru, reduced to 10 men, scored with five minutes to go through Claudio Pizzaro to climb even for the second time with Bolivia at 2-2 and eliminate their fellow Andeans.
A struggling Uruguay played to a scoreless draw against host Venezuela, which finished atop Group A.
The last two quarterfinal berths could be wrapped up on Wednesday in the last Group B matches at Puerto La Cruz, when defending champion Brazil faces winless Ecuador, and already qualified Mexico meets hopeful Chile.
In Merida, Jhasmany Campos capped an excellent first half for Bolivia by scoring in injury time for a 2-1 lead.
The Bolivians looked headed to a victory and making the quarterfinals for the first time since 1997 until Pizzaro, following the expulsion of substitute Jhoel Herrera in the 78th minute, headed in a Juan Carlos Marino free kick in the 85th.
The result broke Bolivian hearts but coach Erwin Sanchez was proud of his players.
"With a little extra luck we could've qualified," he said. "But we're going with our heads held high because nobody was able to crush us, nobody steamrolled past us. It was just this one late goal that eliminated us."
Peru advanced to the quarters for a fifth straight time in the South American championship, but not to coach Julio Cesar Uribe's complete satisfaction.
"I'm not content because it was very difficult for us to achieve our goal of qualifying," Uribe said. "As a team we were far from playing at our top level in the first half."
Bolivia forward Jaime Moreno's lob from the edge of the area over Peru goalkeeper Leao Butron was the opening goal in the 24th minute.
But Peru equalized nine minutes later on a counterattack, when Paolo Guerrero headed a free kick into the ground and inside the left post.
The scoreless draw between Venezuela and Uruguay was good enough for the "Charruas" to claim one of the quarterfinal spots reserved for the two best third-place finishers.
But the Uruguayans, who scored just one goal in three group matches, once again barely threatened the opponent's goal and left gaping holes in the defense that Venezuela was quick to exploit.
The two teams could meet again in the quarterfinals, depending on which third-place slot Uruguay falls into after the other two groups wrap up play.
Venezuela won a group for the first time in its debut as host, with five points. A point behind was Peru, which edged Uruguay for second on goal differential. Bolivia was eliminated on two points.
In the quarterfinals on Sunday in Barquisimeto, Peru will face the winner of the Group C decider between Argentina and Paraguay, which each have a tournament-best eight goals.
For the Thursday matchup, Argentina will be without the services of Inter Milan striker Hernan Crespo, who limped off the field after converting a penalty shot in Monday's 4-2 rout of Colombia.
Argentina's team doctor said on Tuesday that Crespo, who is in a four-way tie as the tournament's leading scorer, would likely miss the rest of the tournament.
On Wednesday, invited guest Mexico will seek to improve its record to 3-0 in Group B when it takes on Chile, which can guarantee a quarterfinal spot with a win.
Ecuador came to Venezuela seeking to consolidate the strong offensive performances that allowed it to qualify for the past two World Cups. But winless after two matches, the veteran squad needs an upset against Brazil to keep alive its hopes of advancing.