Croatia secured their place in the knockout stages of Euro 2020 and dumped Scotland out as they claimed a 3-1 win in Glasgow. Having led through Nikola Vlasic's early strike, Zlatko Dalic's men were pegged back before half-time as Callum McGregor notched Scotland's first Euros goal since 1996.
However, the Croatians' class eventually told, the evergreen Luka Modric netting a stunner before the influential Ivan Perisic headed home from a corner late on, equalling his country's record for the most goals at major tournaments (nine).
And that ensured the visitors clinched second place in Group D while bringing an early end to the Scots' first major tournament appearance since 1998.
Watch: Luka Modric scores sensational long-range goal with the outside of his foot
Encouraged by an electric atmosphere at Hampden Park, Scotland made the better start. But they failed to make the most of their best chance of a frenetic opening period, with Che Adams unable to get a touch on a John McGinn inswinger, allowing Dominik Livakovic to make the save.
And Croatia were not as generous when their first major opportunity came, with Vlasic making the most of space in the box to finish ruthlessly from a Perisic knockdown.
Scotland's chances were dealt a further blow just past the half-hour mark when Grant Hanley limped off, and his replacement Scott McKenna made an inauspicious start that saw a yellow card before a touch of the ball.
However, the Scots levelled things up just before the break when McGregor deftly controlled a panicked clearance before thrashing a low shot into the corner.
With a draw guaranteed to send both sides crashing out, it was no surprise to see them take more chances in looking to carve out attacks in the second period.
Croatia almost made it count when only brave goalkeeping from David Marshall prevented Josko Gvardiol poking home, though the same man was fortunate McGinn could only fire wide after getting on his wrong side moments later.
But it was a moment of sheer quality that eventually broke the deadlock, Modric curling home a beauty with the outside of his boot after slick play around the Scotland box.
The hosts huffed and puffed in the aftermath of that strike but did not really look like scoring before Perisic wrapped things up, flicking a front-post header into the far corner to send his side through.
What does it mean? More to come from Scotland
Although Steve Clarke will have hoped for more, Scotland cannot be too disappointed with their efforts throughout Euro 2020.
Qualifying represented a major achievement in itself, and this young squad will have plenty of opportunities to go one better at major tournaments in the future.
McGregor inspires hope
Without a goal in 33 caps prior to this match, McGregor certainly picked a good moment to break his duck with a fine finish.
It was not to be for the Scots, but the fans inside Hampden Park will always have those delirious moments in the aftermath of the equaliser.
Modric shows his class
He will turn 36 shortly after the start of next season, but Modric is showing no signs of slowing down yet.
As well as scoring a beautiful goal and getting the assist for Perisic, the Real Madrid man ran the show in the centre of the park, taking more touches (115) and making more successful passes (86) than anyone else on the pitch.
Key Opta Facts
-Scotland have been eliminated at the group stages in all 11 of their appearances at major tournaments (Euros and World Cup).
-Croatia have progressed from the group stages at three consecutive major tournaments (Euro 2016, 2018 World Cup, Euro 2020), having only progressed from the group stages in three of their first eight appearances at such tournaments.
-Luka Modric became the oldest player to score for Croatia at the Euros (35 years and 286 days) – he already holds the record for Croatia's youngest scorer at the tournament (22 years 73 days versus Austria in 2008).
-Scotland have lost consecutive matches at Hampden Park for the first time since September 2019 against Russia and Belgium.
-Perisic has been directly involved in six goals in his last six appearances at the Euros for Croatia, scoring four goals and assisting two more. He also became Croatia's joint-top goalscorer at major tournament (Euros and World Cup), equalling Davor Suker's nine goals.
England's win over the Czech Republic means Croatia progress as runners-up and will face the team that finishes in the same position in Group E in the last 16, either Sweden, Slovakia, Spain or Poland.
As for Scotland, a first tournament outing in 23 years comes to an end at the group stages.