Croatia must contest a play-off to qualify for next year's European Championship after finishing second in Group F despite Tuesday evening's victory over Latvia in Rijeka.
Knowing only a victory would give them a chance of overhauling pool leaders Greece, the home side looked set to steal top spot when Greece fell behind in Georgia and they eventually got on top of a stubborn Latvia side.
But news of Giorgos Fotakis' late leveller and Angelos Charisteas' subsequent winner in Tbilisi hushed the Kantrida Stadium, and the best they could have hoped for was to finish as the best group runner-up.
However, Sweden's 3-2 win against Holland ensured they took the best runners-up spot, forcing Croatia into the play-offs.
But Greece's comeback halted the celebrations that had started and quickly switched attentions back to the play-offs.
Slaven Bilic's men dominated from the start but was held scoreless through the first half, and Latvia nearly took the lead in the 59th when Artjoms Rudnevs was one-on-one with Stipe Pletikosa, but the Croatian goalkeeper made a fine block.
Eduardo 'Dudu' da Silva then put Croatia ahead in the 66th with a header, taking a pass from Ivan Strinic. Mandzukic sealed the win with another header in the 72nd after a perfect pass from Dario Srna.
Josip Simunic had a chance to add a third but it mattered little by then as the reality of the situation dawned on the Croatian team.
'We were hoping to go directly to Euro 2012 but still feel we will be there,' Srna said. 'It was a good game today, even though it was not easy to kick back after the setback in Greece last Friday,' when Croatia lost 2-0.
Lineups:
Croatia: Stipe Pletikosa, Ivan Strinic, Josip Simunic, Dejan Lovren, Vedran Corluka (Domagoj Vida, 34), Ivan Rakitic, Luka Modric, Darijo Srna, Mario Mandzukic (Nikica Jelavic, 84), Niko Kranjcar (Ivan Perisic, 59), Eduardo da Silva.
Subs Not Used: Subasic, Vukojevic, Kalinic, Badelj.
Goals: Eduardo 64, Mandzukic 71.
Latvia: Andris Vanins, Oskars Klava, Pavels Mihadjuks, Deniss Ivanovs, Olegs Laizans, Aleksandrs Cauna, Aleksejs Visnakovs (Andrejs Rubins, 88), Ritvars Rugins (Igors Tarasovs, 81), Kaspars Gorkss, Andrejs Pereplotkins (Erdgars Gauracs, 71), Artjoms Rudnevs
Subs Not Used: Doroshevs, Smirnovs, Krjauklis, Lukjanovs.
Booked: Klava, Rugins.
Att: 15, 000
Ref: Antony Gautier (France)