Ecuador fought back from two goals down to secure a 2-2 draw against Peru in Group B at the Copa America Centenario on Wednesday.
Miller Bolanos scored the equalising goal early in the second half after Peru took a commanding lead at the University of Phoenix Stadium in Glendale, Arizona.
Christian Cueva put Peru ahead in just the fifth minute with one of the goals of the centenary tournament, before Edison Flores doubled their advantage eight minutes later.
Enner Valencia reduced the deficit on the stroke of half-time and it was Bolanos who made it 2-2 three minutes into the second period, with neither side finding the net in the closing stages as Ecuador defender Gabriel Achilier saw red for a second bookable offence.
The result keeps Peru in second position in Group B on four points with a clash against Brazil to come, while Ecuador are two points behind and will face Haiti in their final game.
Peru made no changes to their squad that beat Haiti 1-0, but Ecuador coach Gustavo Quinteros elected to make one adjustment to his, bringing in goalkeeper Alexander Dominguez for Esteban Dreer.
Dominguez was not fit to face Brazil but made his return against Peru, and was forced into action inside the opening 50 seconds after Paolo Guerrero was played in by Flores, but the nation's all-time leading goalscorer saw his shot saved.
Peru looked the stronger of the two sides in the opening stages and they were rewarded with a goal in the fifth minute courtesy of Cueva's slick turn and finish.
Cueva, who signed with Sao Paulo last week, nutmegged Achilier with a brilliant touch before finishing past Dominguez.
Peru continued to pile on the pressure and they managed to double their advantage just eight minutes later with another classy finish.
A free-kick on the half-way mark was sent in by Renzo Revoredo and flicked on by Guerrero, and Flores put the ball into the corner of the goal with a fantastic shot off the turn.
Revoredo should have made it 3-0 with a header from a free-kick but he put his effort wide, and Ecuador made him pay for the miss in the 38th minute.
Antonio Valencia played a delectable ball over the defence for namesake Enner, and the West Ham forward chested the ball before slotting it past Peru shot-stopper Pedro Gallese in one movement.
Ecuador went into the half-time break down 2-1 but it took them just three minutes to find an equaliser, after Jaime Ayovi had replaced Juan Paredes.
Rostov midfielder Christian Noboa played in Jefferson Montero, who had the time to chest the ball down and he laid it off to Bolanos for the forward to tap home from close range.
Montero almost put Peru ahead in the 58th minute with a blistering strike from an angle, but Gallese got down well to save at his near post.
Ecuador continued to threaten but it was not until the 70th minute when they had their next clear-cut chance on goal, but Ayovi had his shot saved by Gallese.
In a fast-paced finish to the game both sides went out to secure the three points, and Peru almost clinched a stoppage-time winner, but Manuel Ruidiaz had a thunderous strike go just wide of the post.
Ecuador, meanwhile, finished the game with 10 men after Achilier received his second yellow card in the build-up to Ruidiaz's late chance.