Luka Modric curled home a magnificent finish as Croatia shrugged off a slow start to Euro 2020 to beat Scotland 3-1 on Tuesday and reach the last 16 in style, while leaving their opponents again on the tournament scrap-heap.
Nikola Vlasic and Ivan Perisic were also on target for Croatia in a victory that lifted Zlatko Dalic's side, so leggy and unconvincing in their first two games, up to second in Group D on four points.
They finished ahead, on goals scored, of the Czech Republic, who lost 1-0 to group winners England. Croatia next face the runner-up of Group E - where Sweden, Slovakia, Spain and Poland are all still jockeying for position - in Copenhagen on June 28.
Scotland, who scored their only goal of the tournament through Callum McGregor, finished bottom of the pile on one point, falling to earth with a thump after their positive performance against England at Wembley lifted hopes of reaching the knockouts of a major tournament for the first time.
Modric's form had been called into question at the tournament, but the 35-year-old shaped a delightful finish into the corner of the net with the outside of his foot in the second half to make it 2-1, sending his side on to a thoroughly deserved victory.
Deprived of Billy Gilmour, who failed a COVID-19 test in the buildup, Scotland seemed lacking in midfield and Croatia bossed the ball, dominating possession for large periods before deservedly taking the lead after 17 minutes as Vlasic scored his sixth goal for his country.
There seemed little danger when a cross from the right floated towards the far post but Perisic towered above his marker to head down for Vlasic to swivel and finish low into bottom corner.
The goal drained the life out of Hampden Park and Scotland's fortunes did not look like improving as Croatia stroked passes around the pitch, but just as the World Cup finalists seemed likely to turn the screw further, Steve Clarke's side struck back.
As the clocked ticked towards halftime, Croatia failed to clear a cross from the left and it fell at the feet of McGregor just outside the box.
He took a touch and drilled the ball low into the bottom corner to score his first goal for his country, and Scotland's first in any major tournament for 23 years, breathing life back into the home crowd.
Having dragged themselves back into the match Scotland almost fell behind again at the start of the second half but Josko Gvardiol let his first touch get away from him when one-on-one with Scotland keeper David Marshall and a superb chance went begging.
The reprieve did not last long.
Scotland's John McGinn wasted a great chance when he failed to get a proper connection on the ball from less than a metre out at the far post and that was punished at the other end by Modric's moment of inspiration.
Croatia worked the ball nicely around the box before teeing up Modric from 20 metres and he shaped the ball delicately with the outside of his foot into the far corner to restore Croatia's lead after 62 minutes.
Perisic applied the coup de grace in the 77th minute, sending a glancing header from a corner into the net, ensuring that Scotland's dreadful run of never making the knockouts at a major tournament in 11 attempts continued.
PICS: Sterling's early goal takes England past Czechs
PIX: India in battle for survival after Southee strikes
Will India adopt safety-first approach on Day 6?
Dom's Take: Umbrella in Cricketers' Toolkit?
The evolution of India's pace spearhead Bumrah