A late header from Edinson Cavani gave Uruguay a 1-0 win over Copa America holders Chile on Monday which saw them snatch top spot in Group C at their opponents' expense and set up a quarterfinal meeting with Peru.
The striker glanced Jonathan Rodriguez's cross into the net in the 82nd minute to break the deadlock in a finely balanced game played with a fierce competitive edge even though both teams had already sealed their place in the last eight.
Cavani had been sent off in Uruguay's 1-0 defeat to Chile in the 2015 Copa America quarter-finals after being provoked by Gonzalo Jara and he and his teammates celebrated the goal as if it had just won them a trophy.
"In some moments we played well, in other moments less well, but always with the [right] attitude and mentality we were able to snatch the game," Cavani said after the match.
Chile, who had eased to victory in their first two games with Japan and Ecuador, came close to taking the lead in the second half when Paulo Diaz headed towards goal, but Uruguay defender Jose Gimenez nodded the ball off the line.
Uruguay's Luis Suarez had the best opportunity before the interval when he found space in the area but opted to shoot rather than pass to his unmarked team mates and his attempt was deflected wide.
"It was a keenly contested match with few spaces. We managed a little bit better than our opponents," Uruguay coach Oscar Tabarez said.
A spectator got onto the pitch late in the game and after evading security guards was tripped by Chile defender Jara.
Uruguay finished top of Group C with seven points, with Chile coming second on six and having to settle for a more challenging last-eight fixture with Colombia, who are the only side to have won all their three games in the tournament.
"Undoubtedly, it was a very close game. We knew about our opponents' quality, with a well defined system, a difficult style in terms of their aerial game," Chile coach Reinaldo Rueda said.
"But we played very well, we showed character, we showed discipline."
Japan came third with two points after drawing 1-1 with Ecuador, a result which condemned both sides and saw Paraguay of Group B sneak into the quarterfinals as the second-best ranked side to finish third despite only picking up two points.