Italy snatched a dramatic and deserved 1-0 win away to Poland in their Nations League match on Sunday thanks to a stoppage-time header from Cristiano Biraghi, his first international goal.
Biraghi gave Italy their first win in the competition and also their first in a competitive match since Roberto Mancini took over as coach in May.
It also meant that Poland, who have one point from three games after also losing at home to Portugal on Thursday, will finish bottom of Group Three in League A and will be relegated to the second-tier League B.
It was a richly-deserved win for Italy, who produced one of their best performances in the last few years and twice hit the crossbar in the first half.
Italy have four points from three games while leaders Portugal, who remain firm favourites to win the group and qualify for the semifinals at the end of the season, have six from two.
"We dominated the match, we should have scored earlier and it would have been very unfair if the game had finished 0-0," said Mancini who is rebuilding the side after their failure to qualify for this year's World Cup.
"It's a great win, we can still improve a lot but it needs patience -- these lads need time."
Poland made six changes to the team which lost to Portugal while Italy's lineup was unchanged from Wednesday's 1-1 draw at home to Ukraine.
Italy immediately took the initiative and midfielder Jorginho curled a shot against the bar in the first minute.
Lorenzo Insigne dinked the ball on to the roof of the net from Alessandro Florenzi's pass and the Napoli forward also struck the woodwork on the half-hour after Federico Chiesa sent him clear.
Jorginho then forced Wojciech Szczesny to make a difficult save as Italy continued to dominate the game and create chances.
Italy continued to push forward after half-time, playing some flowing football in the process, and should have gone ahead when Federico Bernardeschi found himself with a free header from Chiesa's cross but sent his shot wide of the target.
Then it was Poland's turn as Kamil Grosicki was sent clear by Roberto Lewandowski. His shot was parried by Gianluigi Donnarumma and the rebound fell to Arkadiusz Milik who fired wide.
A draw would have guaranteed Portugal top spot with two games to spare, but Italy finally got their reward in the 92nd minute.
A corner was touched on by substitute Kevin Lasagne at the near post and Biraghi, winning his third cap, headed in to spark delirious celebrations on the Italy bench.