Chile secured top spot in Group C and avoided Argentina in the Copa America quarterfinals with a late 1-0 win over Peru on Tuesday.
Chile went ahead two minutes into second-half stoppage time when a curling corner taken by Jorge Valdivia missed several players in the area before rebounding off the knee of Peru substitute Andre Carrillo and into an open goal.
Chile finished the group stage with seven points. Peru was next with four points, but it may drop to third if Uruguay defeats Mexico in the last Group C match. Chile avoided Argentina but it may still face Brazil depending on Wednesday's results.
''Chile deserved to finish first in the group,'' coach Claudio Borghi said. ''We have played very well.''
Chile and Peru had already secured spots in the next round and rested several regular starters at the Estadio Malvinas Argentinas. Peru coach Sergio Markarian made nine changes from the squad that beat Mexico 1-0 in its previous match.
Both teams were reduced to 10 men from the 62nd when Chile's Jean Beausejour and Peru's Giancarlo Carmona were red carded for an altercation which followed a rough challenge.
Chile controlled the action from the start and had most of the significant scoring opportunities.
Striker Esteban Paredes, replacing starter Alexis Sanchez, came close after a left-flank cross by Beausejour in the 14th, but he was just a bit late trying to reach the ball in front of the net.
Humberto Suazo's shot went wide a minute later, and Peru threatened with William Chiroque's shot in the 26th and a missed opportunity by Josepmir Ballon in the 39th.
Two minutes into the second half, Paredes went close again with a header that caught the outside of the net.
Sanchez' free kick in the 82nd went over the crossbar and Luis Antonio Jimenez's header in the 86th missed wide. Suazo just barely reached a dangerous cross inside the area just before stoppage time.
''It's good to lose too,'' Markarian said. ''You learn from it.''
The victory will keep Chile at its headquarters in Mendoza, near the Chilean border. It had the majority of the fans at the stadium on Tuesday.
''This is an advantage because we will get to stay in a place we are used, without having to travel,'' Borghi said.
Peru: Salomon Libman, Santiago Acasiete (Walter Vilchez, 45), Renzo Revoredo, Aldo Corzo, Giancarlo Carmona, Christian Ramos, Josepmir Ballon, Michael Guevara (Carlos Lobaton, 69), Antonio Gonzales (Andre Carrillo, 76), Raul Ruidiaz, William Chiroque.
Chile: Miguel Pinto, Francisco Silva (Gary Medel, 78), Waldo Ponce, Gonzalo Jara, Carlos Carmona, Marco Estrada, Jean Beausejour, Gonzalo Fierro (Jorge Valdivia, 57), Humberto Suazo, Luis Jimenez, Esteban Paredes (Alexis Sanchez, 57).
Referee: Salvio Fagundes (Brazil).