Luka Modric’s second-half strike looked like sending Croatia through as the Group B runners-up, but Zaccagni swept a brilliant shot inside the far post in the eighth minute of added time to cap a furious finale from the defending champions.
Italy needed a point to progress, while Croatia realistically needed a win to stay in the tournament. The Croatians have two points from their three games and were at the mercy of other results to see if it was enough to scrape through as one of the best third-place finishers.
Italy will next face Switzerland in the round of 16 on Saturday in Berlin’s Olympiastadion, where the final is on July 14.
Modric scored 33 seconds after having a penalty saved by Italy goalkeeper Gianluigi Donnarumma to become the oldest goal-scorer ever at the tournament.
At 38 years, 289 days, Modric broke the record held by Ivica Vastic, who was 38 years, 257 days when he scored for Austria against Poland at Euro 2008.
After Modric’s penalty miss, Croatia immediately attacked again and Donnarumma had to save a shot by Ante Budimir. Modric pounced on the rebound in the 55th minute.
Alessandro Bastoni headed just over in response as the Italians suddenly found themselves in need of a goal. Defeat could have seen the defending champions knocked out depending on results in other games.
Modric turned his skills to defence until he went off to standing ovations in the 80th minute.
But Italy maintained their pressure and it finally paid off at the last possible moment with Zaccagni’s curling shot.
AAP