Danijel Subasic saved three penalties as Croatia knocked out dogged Denmark in a nerve-shredding shootout to set up a World Cup quarter-final tie against hosts Russia.
It came at the end of a largely disappointing tie – and one that had seen Luka Modric spurn a golden chance to snatch a late winner when his penalty shortly before the end of extra-time was superbly saved by Kasper Schmeichel.
The Leicester City goalkeeper also saved two penalties in the shootout at the Nizhny Novgorod Stadium but he could not prevent Ivan Rakitic slotting home the decisive 10th kick.
The Croatia players charged towards Rakitic after his decisive strike with the look of a team who knew they had survived an almighty scare against a Danish side that seemed to have the momentum with them moving into the shootout.
It was a match that ended in stunningly dramatic fashion – and started that way as well.
Martin Jorgensen capitalised on the chaos caused by a long throw to fire a weak shot beyond Subasic in the opening minute.
A scuffed clearance and an inadvertent header off Danish midfielder Martin Delaney left Mario Mandzukic with a good chance that he gobbled up, shooting beyond Schmeichel as Croatia soon levelled.
Neither side had previously conceded from open play in Russia – but the prospect of an unexpected glut of goals faded as quickly as the tempo.
It was a lacklustre tie played with front of a largely delighted crowd as the local fans inside the stadium revelled in Russia’s earlier shootout victory over Spain.
The second half was particularly dreadful and the match seemed to have an inevitability of penalties from well before the start of extra-time.
An off-colour Modric fluffed his big chance but did convert in the shootout as Croatia stay alive in the competition and remain in the hunt to emulate the side of 1998, which reached the last four in France.
Croatia were superb the last time they played in Nizhny Novgorod, humbling Argentina 3-0 and laying down a real marker than they are contenders here in Russia.
But they were a shadow of that side on Sunday.
Their passing was off, they seemed to lack energy and ambition – and their ability to unpick a well-drilled opposition was limited.
Modric had warned before Sunday night’s encounter that the Danes would provide a “stern test” and his words proved prophetic.
The Real Madrid man had come into this match on the back of several excellent displays but he and fellow influential midfielder Rakitic were well below par.
Modric’s evening was perhaps summed up when he missed the chance to snatch a late win from the penalty spot.
In one of the few bright spots of his evening he had played an exquisite through ball to Ante Rebic, who seemed certain to score after adroitly rounding Schmeichel before he was brought down by goalscorer Jorgensen with the empty net gaping.
But Modric struck his kick at a good height for a keeper and Schmeichel, diving to this left, managed to hold the ball.
Croatia had been dumped out of Euro 2016 by Portugal in the last 16 after conceding late in extra-time and, as Denmark went into the shootout with their tails up, it did look as though they might suffer late heartbreak again.
But they survived – arguably fortunately – and remain alive in what is seen as the favourable half of the draw, with none of the teams left in Fifa’s top 10 rankings.
Back in Euro 2016 Croatia missed out on winnable ties against Poland and Wales – and they do not want to do pass up a chance to go deep again.
Denmark had only once previously reached the last eight of the World Cup – losing to Brazil at France 98 – but Age Hareide’s side can consider themselves unfortunate to have lost against Croatia.
They sparked the game into life with their first-minute goal, which saw Huddersfield’s Jorgensen shoot between the legs of two Croat defenders and defeat Subasic with what was a very saveable shot.
It came after a long throw from Ipswich’s Jonas Knudsen and was very much made in the English Championship.
And they can hardly be blamed for playing to their strengths of defensive organisation and looking to capitalise on long throws and the occasional openings that come their way.
Christian Eriksen – who never lacked effort and endeavour but was a largely peripheral figure – clipped the apex of the goal in the first half and Denmark were undoubtedly the more ambitious side in an atrocious second half.
Denmark made a huge contribution to the worst game of the tournament so far when they and France played out a mutually convenient, insipid goalless draw in their final group match.
But they cannot be accused of spoiling this tie in Nizhny Novogorod, although in truth they probably exit the World Cup at a stage that is commensurate with their ability.