Italy progress in second place behind winners Spain and will face Switzerland in the last 16, while Croatia are on the verge of elimination but could still progress depending on other results going their way later in the week.
With only two points it is unlikely Zlatko Dalic's side will qualify as one of the four best third-place teams but it is still possible.
Croatia midfielder Luka Modric became the oldest goalscorer in the competition's history with his strike after 55 minutes, just 33 seconds after Gianluigi Donnarumma saved the 38-year-old's penalty.
Luka Modric (R) scores in Croatia's 1-1 draw against Italy at Euro 2024 on June 25, 2024. Photo by Reuters |
It seemed to be enough for Croatia, but Zaccagni whipped a brilliant strike into the top corner on the break in the 98th minute to send Italy through from what was dubbed a "group of death".
"It's very stressful, we kept battling right until the end but unfortunately football was mercilessly with us tonight, it was cruel," Modric told reporters.
"That's part and parcel of football, often it gives you plenty of smiles but on other occasions it makes you very sad, like it did today.
"The footballing gods don't always smile on us but we should be proud for the way we've represented our country tonight."
Italy coach Luciano Spalletti said his team deserved to progress.
"This is football, we believe until the end," said Spalletti.
"We deservedly got through... maybe we are satisfied with the result, but we need to do more."
Zaccagni celebrates after scoring Italy's equalizer against Croatia at Euro 2024 on June 25, 2024. Photo by Reuters |
After shipping five goals in the first two games, Dalic opted to shore up the midfield by bringing in Mario Pasalic and Luka Sucic amid four changes.
The coach also maintained the trio of Modric, Marcelo Brozovic and Mateo Kovacic despite their struggles in the 3-0 defeat by Spain and 2-2 draw against minnows Albania.
Spalletti's Italy beat Albania 2-1 but were dominated by Spain in a 1-0 defeat and the coach shifted to a 3-5-2 formation, dropping Juventus' Federico Chiesa.
Croatia dominated the opening exchanges against a defensive Italy side knowing a draw would send them through in second place behind group winners Spain.
On his first start at the tournament 21-year-old RB Salzburg midfielder Sucic forced a fine early save from Italy's Gianluigi Donnarumma with a vicious drive from range.
Azzurri forward Mateo Retegui's header was deflected narrowly wide at the other end on a rare forray forward, with the two-time winners happy to slow the game down and waste time at corners and throw-ins as early as the 20th minute.
Croatia goalkeeper Dominik Livakovic made a stunning stop to thwart Alessandro Bastoni, found by Nicolo Barella's tempting cross, as the holders gained control without taking risks.
Focal point
Dalic, who steered Croatia to the 2018 and 2022 World Cup final and semis respectively, threw on powerful striker Ante Budimir for the second half.
It gave his team a focal point and they looked instantly more threatening and swiftly reaped their reward.
Italy substitute Davide Frattesi handled Andrej Kramaric's effort and after a VAR review Croatia were given a penalty.
Donnarumma clawed out Real Madrid midfielder Modric's effort but the veteran could not be denied 33 seconds later.
The Italian goalkeeper made another fine save in the aftermath from Budimir as Croatia kept the pressure up and Modric smashed home the rebound from close range.
He beat the previous record for oldest Euros goalscorer set in 2008 by Austrian Ivica Vastic by 32 days.
Modric was replaced with 10 minutes to go and even some Italy supporters afforded the playmaker an ovation, while they nervously eyed the ever-advancing clock.
Croatia thought they had progressed but Zaccagni broke their hearts in the eighth and final minute of stoppage time.
Italy have still never beaten Croatia in nine attempts but the 29-year-old Lazio winger's curling strike felt like a winner for the quarter of the stadium decked out in Azzurri blue.
Modric was named player of the match but looked shellshocked at the end, with some suggesting this could be his final appearance for his country.
"I'd like to keep playing forever but there will come a time when I'll have to hang up my boots," said Modric.
"I'll keep playing on, I don't know for how much longer."