Chile are on the verge of qualifying for the last eight of the Copa America after an end-to-end 3-3 draw with Mexico.
Mexico took the lead through Matias Vuoso, tapping in from close range following Juan Carlos Medina's cross.
However, the tournament hosts replied immediately, with Arturo Vidal rising highest to head home from a corner.
Gerardo Flores's header was then pushed onto the bar by Chile goalkeeper Claudio Bravo, but Mexico restored their advantage when Raul Jimenez headed in from a tight angle.
Chile responded well again, and equalised just before half time thanks to Eduardo Vargas, scoring the game's third header after Vidal's cross.
Jorge Sampaoli's side knew that a win would seal their progress into the quarter-finals, and took the lead for the first time shortly after the break after Vidal was fouled in the penalty area.
The Juventus star blasted the ball into the back of the net for his second goal of the tournament.
However, Mexico fought back again and Vuoso also netted his second as he ghosted into the box and squeezed a low shot into the corner.
Chile went close to winning the game late on through Alexis Sanchez, but his effort from close range missed by a whisker.