Edinson Cavani scored twice as Uruguay booked a quarter-final date with France and sent Cristiano Ronaldo's Portugal home after a 2-1 win in Sochi.
Cavani opened the scoring just seven minutes into the keenly-fought contest when he finished off a stunning cross-field one-two with Luis Suarez.
Pepe equalised with a towering 55th-minute header but Cavani hit back with a stylish first-time strike (62) to send Oscar Tabarez's men through to the last eight for the first time since 2010.
Ronaldo, thwarted at set-pieces and restricted to potshots, struggled to inspire the European champions and bows out of the tournament on the same day as La Liga rival Lionel Messi, two headline acts whose World Cup time may be up.
Uruguay: Muslera (6), Caceres (6), Gimenez (7), Godin (8), Laxalt (6), Nandez (6), Torreira (7), Vecino (6), Bentancur (7), Suarez (8), Cavani (9).
Subs used: Rodriguez (6), Stuani (6), Sanchez (6).
Portugal: Rui Patricio (6), Ricardo Pereira (6), Pepe (7), Fonte (7), Guerreiro (7), Bernardo Silva (6), William Carvalho (7), Adrien Silva (6), Joao Mario (6), Goncalo Guedes (6), Ronaldo (7).
Subs used: Quaresma (6), Silva (6), Fernandes (n/a).
Man of the match: Edinson Cavani
Portugal's familiar hero had looked predictably up for it, performing a theatrical flick on the left flank before taking aim for the first time of the night, only to fire straight at Fernando Muslera.
But Cavani headed Uruguay in front with thrilling simplicity just moments later, launching a diagonal ball to Suarez, charging into the box and rising at the back post when his team-mate whipped a cross back in.
Portugal made three changes to their line-up, with Bernardo Silva, Goncalo Guedes and Ricardo Pereira handed starts.
Jose Gimenez replaced Sebastian Coates in defence for Uruguay.
Portugal responded well to the setback but Ronaldo was denied a bullet header by Jose Gimenez's intervention and when Rodrigo Bentancur's foul presented a free-kick chance, the Ballon d'Or holder smashed into the wall.
The imperious Diego Godin had marshalled Uruguay's mean defence as attacking team-mates hustled and harried upfield but Portugal returned from the break with renewed intent and when Raphael Guerreiro crossed after a short corner, Pepe leapt unmarked to draw his side level.
Portugal had fresh faith but Uruguay took just seven minutes to reassert their authority, Bentancur rolling a ball that Cavani swept into the far corner without breaking stride.
Uruguay's matchwinner hobbled off shortly after, ice packs applied to his shin, but Bernardo Silva wasted a good chance as Ronaldo lashed from range in desperation as time ticked down.
Tabarez's men were tiring but in a frantic finale, they survived a string of late balls into the box and Ronaldo - whose late yellow card would have ruled him out of the next round had his side got there - trudged off stony-faced.
Man of the match - Edinson Cavani
Cavani and Suarez linked up brilliantly on the Black Sea coast but Uruguay's two-goal hero gets the nod. He scored with both his shots on target, taking his international tally to 45 goals, and the first - even though his cheek took the impact - finished a breathtaking move. A nation will hope he can quickly shake off that knock in time to face PSG team-mate Kylian Mbappe.
- This is the first time Uruguay have won their opening four games to a World Cup tournament since 1930, with the fourth game in that run being their 4-2 victory over Argentina in the final.
- Uruguay's winning goal came from their only shot of any kind in the second half. They had just 30 per cent possession after half-time.
- Cavani scored his 44th and 45th goals for Uruguay tonight. 12 of those have been assisted by Luis Suarez.
- Since 1966, only Grzegorz Lato and Andrzej Szarmach (5 for Poland) and Michael Ballack and Miroslav Klose (5 for Germany) have combined for more World Cup goals than Uruguay's Edinson Cavani and Luis Suarez (4).
- Portugal's Cristiano Ronaldo has played 514 minutes of football in the knockout stages of the World Cup, but has failed to score or provide an assist.
- Ronaldo attempted six shots for Portugal tonight (one on target) - one more than the entire Uruguay team managed over the 90 minutes.
- At 35y 124d, Pepe became Portugal's oldest-ever goalscorer in a major tournament match (World Cup and European Championships).
While Ronaldo's World Cup dream is over, Uruguay can relish a quarter-final clash with France on Friday afternoon (3pm kick-off) in Nizhny Novgorod.