Scotland's hopes of progression to the knockout stages of a major tournament for the first time were dashed by Croatia, as a Luka Modric masterclass helped the 2018 World Cup finalists book their place in the last 16 of Euro 2020 with victory at Hampden Park.
After a fast start from Scotland, Croatia took the lead through Nikola Vlasic (17), after he lost Scott McTominay in the box to prod home Ivan Perisic's towering back-post knock down.
For long periods Scotland were unable to contain Modric and Mateo Kovacic in midfield, but Callum McGregor equalised on 42 minutes with his first Scotland goal - a thunderous drive after Croatia failed to clear an Andy Robertson cross.
Opportunity knocked for Scotland, but Real Madrid midfielder Modric clipped home a wonderful second just after the hour mark (62), curling it past David Marshall from distance with the outside of his right foot.
- How the teams lined up | In-depth stats and analysis
- Player ratings: Midfield outclassed by Modric and Co
- Euro 2020 group tables | Who has qualified for last 16?
- Subscribe to Sky Sports' Euro 2020 podcast
With Scotland on their knees, Perisic beat Kieran Tierney at the near post to glance in a header for his second goal of the tournament (77), and consign Scotland to bottom place in Group D.
Steve Clarke's side never stopped battling, and always looked dangerous when pressing their opponents, but at times they were their own worst enemy in defence, and were ultimately undone by a battled-hardened, classy Croatian side.
Croatia: Livakovic (6), Juranovic (6), Lovren (6), Vida (5), Gvardiol (7), Kovacic (7), Brozovic (7), Perisic (8), Modric (9), Vlasic (7), Petkovic (5).
Subs: Barisic (6), Kramaric (6), Ivanusec (6), Rebic (N/A).
Scotland: Marshall (7), Robertson (6), O'Donnell (4), Hanley (5), Tierney (5), McTominay (5), McGinn (6), Armstrong (5), McGregor (6), Dykes (5), Adams (5).
Subs: McKenna (5), Fraser (5), Nisbet (N/A), Patterson (N/A).
Man of the Match: Luka Modric (Croatia)
How Modric and Croatia proved too much at Hampden...
It was a deflating end to what was arguably the most important night in the history of the Scottish national team. Hampden Park had been bouncing to the songs of the Tartan Army for more than an hour before kick-off, with optimism in the sunny Glasgow evening abounding, as Clarke's side aimed to follow his call to become legends and go further than any Scotland team had gone before.
There was just one change to the side that performed admirably against England. Billy Gilmour's positive Covid diagnosis ruled him out, with Stuart Armstrong a straight replacement in midfield, as McTominay remained in the back three after impressing at Wembley.
Scotland responded to the partisan atmosphere from the off, forcing two corners inside the opening minute - the second barely punched clear by goalkeeper Dominik Livakovic under pressure from Grant Hanley.
Croatia were determined to quell Scotland's fast start by controlling possession, but they were initially harried at every turn, and looked defensively vulnerable. John McGinn cut inside, but his cross was millimetres beyond the boot of the unmarked Che Adams at the back post. Adams then had a go from distance, in a similar position to where he scored his first international goal against the Faroes in March, but it drifted wide of Livakovic's left-hand post.
The danger for Scotland was not to get caught cold, and Marshall was alert to race out of goal and clear, as Bruno Petkovic lurked menacingly. It was a warning the Scots did not heed. Perisic rose highest at the back post to head down Josip Juranovic's cross from the right, and Vlasic escaped McTominay long enough to take a touch and poke it past Marshall. It was perfect execution, but far too easy from a Scottish defensive perspective.
The goal sucked some of the life out of the crowd, but Hampden was nearly silenced as Modric rasped a drive just over from 25 yards. Croatia were now dominating the ball, with Scotland unable to get a grip in the middle of the park - only McGregor seemed a match for Modric and Kovacic's intricate play.
When Scotland did get an opportunity, McGinn latched onto Stuart Armstrong's delightful floated pass at the back post, but his cutback evaded Lyndon Dykes and Adams. The Aston Villa midfielder then stabbed an effort on goal that Livakovic at full stretch tidied up.
Dejan Lovren was booked for clattering Adams, but Clarke was then forced to make an early change as Hanley succumbed to a calf problem, with Scott McKenna replacing him. Moments later the Nottingham Forest defender was in the referee's book after mistiming his first attempt at a tackle on Marcelo Brozovic.
A Scotland goal looked a forlorn prospect before half-time, but suddenly it arrived, and the roof nearly blew off Hampden. Robertson's cross hit Adams on the back of the legs, but Domagoj Vida made an appalling attempt at a clearance which fell to McGregor on the edge of the box. The Celtic midfielder took a touch and then hammered the ball low into the far corner, and a nation exploded with joy. It was the first goal for Scotland's men at a major tournament since Craig Burley scored against Norway at France '98.
Scotland were cheered off by the Tartan Army at the break, but more was required, particularly a firmer grip on midfield, with Croatia having 69 per cent of possession in the opening half. For all their control of tempo, they had rarely looked like cutting Scotland open, but when Josko Gvardiol bounded forward and latched onto Brozovic's pass, it looked ominous - until Marshall bravely dived at the left-back's feet, taking a whack for his troubles.
The game was on a knife-edge; one goal for either could spell the end for the other. This was not a time for mistakes, but McTominay let Perisic run in behind him and watched helplessly as the Inter Milan winger bore down on Marshall. Perisic's volley was powerful, but the goalkeeper stood tall and beat the ball clear.
McGregor was trying to remain prominent amid the Croatian midfield masterclass, and he released Robertson, whose cross was met by McGinn at the back post, but he failed to make clean contact as he clattered into Livakovic.
Scotland made one change from the 0-0 draw with England, as Stuart Armstrong came in for Billy Gilmour, who tested positive for Covid-19.
Croatia made four changes as Vlasic, Juranovic, Brozovic and Petkovic came in, replacing Vrsaljko, Kramaric and Rebic.
Neither team looked comfortable defensively when pressed, but Modric preyed on those Scottish frailties with a sensational, crucial second goal on 61 minutes. Kovacic was given far too much time on the edge of the box, and laid it off to Modric, who curled a majestic shot into the far corner with the outside of his right foot. For all the talk of the former Ballon d'Or winner's decline, this was a statement of the highest class.
The decisive third arrived from Perisic, who met Modric's corner at the near post with the deftest of touches to leave Marshall grasping at air, and Scotland in tatters.
Late half-chances for Adams and McKenna were spurned, summing up Scotland's profligacy in front of goal, but ultimately they were undone by their defending, as Croatia celebrated their first-ever win over Scotland and second place in the group.
'Croatia took control - but Scotland must build on this'
Kris Boyd on Sky Sports News:
"We were beaten by the better team. For all that Scotland went to Wembley and frustrated England, we couldn't get a foothold of the game. We started well but Modric, Brozovic, Kovacic had control for long periods of the game and if you allow quality players time and space, they're going to hurt you.
"We didn't get in their faces enough but if there's a goal you want to go out to - before they scored the third - Modric's goal was unbelievable, the way he bent it with the outside of his foot. Every bit of that quality was on show - he was fantastic.
"Scotland have to take the positives - qualifying was a big step. I hope with the bunch of boys, the young crop, it's not too long before we're back at a major competition because the Tartan Army makes some atmosphere and these players deserve a lot of credit. They have galvanised the country and we have to build on that now.
"Gilmour, Turnbull, Patterson, McTominay... it will do them no harm getting a taste for a major competition. It wasn't to be but I think this could be the start of something; there's no reason it can't be."
Scotland players vow: This is just the start
Andy Robertson to ITV:
"Croatia showed why they've got to a World Cup final. Modric ran the game.
"But I'm so proud to be captain of this country and these players. I know we've fallen short but the love we've felt from the nation has been special. The squad has a lot of potential and it's important we build on this."
Callum McGregor to ITV:
"The lads are shattered. They put so much energy into it. The fans were amazing. They just had too much quality in the end. It's a tough lesson.
"It's been an amazing experience. Every single one of us has learned so much. It makes us so hungry for the World Cup."
John McGinn to ITV:
"I'm devastated we're not through. We have to use this experience to drive us on. We want this to be the start.
"We need to be braver and better but we've got the talent. We feel the passion from the nation and come the autumn, we can be together with all the fans going for the World Cup. It's an experience I'll never forget - hopefully one of many."
Man of the match - Luka Modric
His 35-year-old legs starting to look a little leaden? No chance, on this display.
Real Madrid's former Ballon d'Or winner put on a world-class show, showing off his passing range as well as a
highlight reel of twists, turns, dummies and feints.
Then there was that finish, artistically bent with the outside of his boot. Yes, Luke Modric has still very much got it.
Opta stats - more group woe for Scotland
- Scotland have been eliminated at the group stages in all 11 of their appearances at major tournaments
- Croatia beat Scotland for the very first time in what was the sixth match between the two sides.
- Scotland have won only one of their last nine competitive matches (D4 L4), having won six of their previous eight (D2).
Croatia will now play the runners-up from Group E in the last 16 in Copenhagen on Monday at 5pm, either Spain, Slovakia, Sweden or Poland.