Mattia Zaccagni scored in the final minute of stoppage time as Italy broke Croatia’s hearts with a late equaliser that ensures the defending champions progress to the last 16 of Euro 2024.
Luka Modric had thought he had won it for his side to send them through as runners-up in Group B when he slammed a shot into the roof of the net early in the second half.
That came after he had seen a penalty saved, but the swift response to that setback looked like it would be enough for the Croatians.
But Italy levelled in stoppage time when Zaccagni curled home in the 98th minute to ensure they go through with group winners Spain.
It was a cruel blow for Croatia, who had been minutes away from progressing but two points is now unlikely to be enough to finish as one of the best third-placed teams.
An early Ferran Torres strike gave Spain’s second-string side a 1-0 win over Albania on Monday as the three-time champions finished the Euro 2024 group stage with a perfect record and the defeat eliminated their opponents.
Barcelona winger Torres finished off a fine move in the 13th minute in Duesseldorf to puncture the atmosphere in a stadium filled with a majority of noisy Albanian fans.
However, this game was not a cruise for a Spain team showing 10 changes to the side which started their 1-0 win over Italy four days earlier.
Spain had already secured top spot in Group B, but Albania knew they realistically needed a win to go through and that made for a frantic encounter at times, particularly as they pushed forward in the second half.
Despite their best efforts, Albania go home after picking up only one point and finishing bottom of a difficult section.
It is a regression for them from their debut European Championship appearance in 2016, when they also went out in the first round but did manage to win a game.