Uruguay 0-0 Peru (4-5 on penalties)
Uruguay crashed out of the Copa America after seeing three goals disallowed for offside before being beaten on penalties, with Luis Suarez's spot-kick saved, as Peru booked a place in the semi-finals.
Having topped Group C ahead of holders Chile, Oscar Tabarez's men had been expected to offer too much attacking quality for Los Incas, who progressed as one of the third-placed sides despite a 5-0 thrashing by hosts Brazil in their last match.
Uruguay, though, were left frustrated by marginal offside decisions in Salvador which saw goals from Giorgian De Arrascaeta, Edinson Cavani and Suarez all ruled out.
Paris St Germain striker Cavani also blazed over from close range during the first half, which would prove a costly miss.
While Peru offered little during the 90 minutes, and some seven of stoppage time, goalkeeper Pedro Gallese stopped the opening spot-kick from Suarez before his team-mates all confidently dispatched theirs to secure a 5-4 victory in the shoot-out.
Peru will go on to face Chile, who edged out Colombia on spot-kicks, for a place in the final when they meet in Porto Alegre on July 3.
Uruguay should have been ahead in the 25th minute.
Suarez weaved his way into the Peru penalty area but Gallese produced a reaction save and Cavani could only blaze the rebound over on the volley.
When Uruguay did have the ball in the net in the 29th minute from De Arrascaeta's 12-yard drive, the offside flag was up.
Cavani then thought he had broken the deadlock on the hour after a curling finish from Suarez's pass, only for celebrations to again be cut short by an offside flag. Despite a lengthy review by the Video Assistant Referee, the decision stood.
There was more frustration for Uruguay in the 72nd minute when Suarez turned in a cross from Martin Caceres only to see that goal also ruled out.
During stoppage time, Suarez just could not connect with De Arrascaeta's lofted pass, leaving the outcome to be settled by the lottery of a penalty shoot-out.