Graziano Pelle sealed Italy's place in the Euro 2016 quarter-finals with a stoppage-time strike to sink reigning champions Spain at the Stade de France.
Leading and largely dominant after Giorgio Chiellini's first-half opener, the Italians had survived a scare moments earlier when Gianluigi Buffon saved superbly to deny Gerard Pique an equaliser.
But Pelle's brilliant finish at the other end completed a richly deserved 2-0 win for Antonio Conte's side, who were only denied a bigger winning margin by the brilliance of Spain goalkeeper David De Gea.
De Gea pulled off a string of fine saves to deny the likes of Pelle, Emanuele Giaccherini and Eder but Italian class told in the end as they underlined their emergence as genuine contenders to seize the vacated crown.
Spain had seemed under the weather from the first minute, which was greeted by a torrential downpour, and De Gea was soon called into action with an excellent diving save to stop Pelle's well-directed free-kick.
Two minutes later the Manchester United keeper made an even better stop to deny Giaccherini, whose overhead kick in the box was palmed onto the foot of the post, although the referee subsequently penalised the Italian for dangerous play.
Spain had a rare half-chance in the 20th minute when Nolito made good ground on the left before pulling the ball back for Cesc Fabregas, whose powerful low drive was blocked by Chiellini.
But Italy remained in the ascendency with Mattia De Sciglio in particular causing problems down the right, and his dangerous cross almost connected with the head of Marco Parolo in front of goal in the 26th minute.
Sergio Ramos squirted an attempted clearance past his own post from another De Sciglio ball two minutes later, before the Italians grabbed the opener they more than deserved just past the half-hour mark.
De Gea stuck out a foot to stop Giaccherini reaching Eder's free-kick in front of goal but he could only deflect the ball to the advancing Chiellini, who fired home from close range.
It could have been worse for the Spaniards but for De Gea, who plucked an Alessandro Florenzi cross out of the air then saved brilliantly to deny Giaccherini again on the stroke of half-time.
Spain gradually gained more possession in the second period and Alvaro Morata missed a good chance when his header in front of goal fell straight into the arms of Buffon.
But it was a rare opportunity for the defending champions and Italy continued to come close, Eder denied again by De Gea in the 56th minute after springing clear down the right on a counter-attack.
Spanish pressure became more consistent as the minutes ticked by, Aritz Aduriz shooting wide after a fine dummy by Andres Iniesta, then Fabregas playing through Lucas Vazquez only to find the substitute marginally offside.
And it was Buffon who rose to the occasion in the dying minutes, denying first Iniesta then Pique before Pelle rounded off a superb individual performance with the goal to send his country through to the last eight.
Do YOU want to write for GiveMeSport? Get started today by signing-up and submitting an article HERE: http://gms.to/writeforgms