Peru on Wednesday entered the final of the Copa America for the first time in 44 years stunning defending champions Chile 3-0.
The stunning upset prevented Chile's golden generation from challenging for a third straight title, following their wins over Argentina in 2015 and 2016.
Instead the finalists from the previous two editions will meet in Saturday's third-place play-off in Sao Paulo.
Little was expected of Peru in the knock-out stages after they ended the group phase with a humbling 5-0 thrashing by Brazil.
But after riding their luck − and being saved by VAR three times − to beat Uruguay on penalties in the quarter-final, they were a completely rejuvenated outfit in Porto Alegre.
Goalkeeper Pedro Gallese, the villain of that 5-0 defeat, was again faultless, as he had been in the quarter-final when decisively saving Luis Suarez's shoot-out penalty.
He again saved a penalty and made a number of other vital stops.
Goals from Edison Flores, Yoshimar Yotun and Paolo Guerrero handed Peru a deserved win which sends them into a final against Brazil at the Maracana Stadium on Sunday.
From the start Peru dominated the reigning champions, with Christian Cueva wastefully shooting wide two minutes in after he was teed up in space by his captain Guerrero.
On seven minutes Chile's Charles Aranguiz started and finished a superb passing move involving Alexis Sanchez and Jean Beausejour, by placing a precise shot just past the post.
Flores took advantage of an Erick Pulgar slip in midfield to dart towards goal but he dragged his weak shot woefully wide.
But a minute later he was alone at the back post to lash home left footed from an Andre Carillo flick on from Cueva's cross.
Striker Guerrero made a timely intervention in his own area to prevent a Sanchez corner from sneaking in at the near post.
Yotun doubled the lead on 38 minutes after punishing Chile goalkeeper Gabriel Arias's rush of blood to the head.
Carillo chased a long ball down the right hand side and beat Arias, who ill-advisedly had charged from his area, to the ball before picking out Yotun on the edge of the 18-yard area.
Faced with four back-tracking defenders, Yotun calmly controlled the ball on his chest and sent a low volley straight down the middle of the empty goal.
Agence France-Presse