The Atletico Madrid center back scored late on to clinch a last-16 berth at the expense of Cesare Prandelli's side, as Luis Suarez was embroiled in another controversy.
Luis Suarez was at the center of another controversy as Uruguay beat Italy 1-0 to progress from Group D at the FIFA World Cup.
The Liverpool forward appeared to bite the shoulder of Italy defender Giorgio Chiellini towards the end of Tuesday's match in Natal.
Diego Godin subsequently bundled in a corner for the game's only goal, sending Uruguay through to the last 16 at Italy's expense.
Yet Suarez's apparent indiscipline is likely to grab the headlines, with the 27-year-old having been involved in biting incidents before at both Liverpool and Ajax.
Italy, which needed only a point to qualify alongside Costa Rica, was hampered by the 59th-minute dismissal of Claudio Marchisio, for a high tackle on Egidio Arevalo.
The team will now be left to rue another first-round exit at the World Cup, its second in succession, while Uruguay awaits the winner of Group C.PHOTOS: USA vs. Portugal | U.S. fan reactions | Beautiful people in Brazil
It remains to be seen whether Suarez will receive punishment for his apparent bite, with FIFA able to examine his tangle with Chiellini should it feel disciplinary action is warranted.
Prior to the late drama, Italy looked set to do enough to shut out its opponent as the Azzurri soaked up pressure with relative comfort.
The match began with a host of full-blooded challenges, perhaps unsurprisingly given the prize at stake.
Mario Balotelli had Italy worried when he began to limp after a heavy challenge, while Suarez and Chiellini were also on the receiving end of physical collisions in a feisty opening.
The crowd had to wait until the 12th minute to see an effort on target, when Andrea Pirlo fired a dipping free kick that Fernando Muslera needed to tip over, and the remainder of the opening half hour passed by with little action of note.
Gianluigi Buffon was then called on to deny Suarez and Christian Lodeiro from close range following intricate build-up play, while Martin Caceres struck an audacious effort way wide from distance.
Cavani's appeal for a penalty was waved away following a tangle with Leonardo Bonucci before Cristian Rodriguez wasted a golden opportunity for Uruguay.
Suarez clipped a ball in to the Atletico Madrid man, who skewed an effort wide when through on goal.
Marchisio was handed a straight red shortly after and Suarez was quick to test the 10 men of Italy - bursting through the defense only to be denied by Buffon.
If that showed the Liverpool man's talent on the ball, his clash with Chiellini seemingly offered an insight into the less savory side of Suarez's will to win.
The Juve defender was eager to show referee Marco Rodriguez his shoulder and Italian tempers flared up considerably after Godin headed in the winner.
Cesare Prandelli's side was unable to find an equalizer and questions over the actions of Suarez appear set to dominate the aftermath of Italy's elimination.