Iceland failed in their attempt to reach the World Cup knockout stages for the first time as Croatia secured a late win to top Group D on maximum points.
The Nordic nation knew they had to win to stand any chance of reaching the last 16 and their colourful support looked dejected in Rostov on Don where their side missed key chances late in the first half.
Alfred Finnbogason and Birkir Bjarnason both went close before the interval but Milan Badelj stylishly slammed home for Croatia after the break.
That forced Iceland to chase the game and they hit the bar through Sverrir Ingason before Gylfi Sigurdsson won a penalty through a Dejan Lovren handball and converted it to level.
In the dying minutes, with Argentina leading Nigeria 2-1 some 1,100 miles away in St Petersburg, Iceland knew a win would see them jump ahead of the South American nation in second place.
But their attacks became less frequent as Croatia took more control and Ivan Perisic – one of only two places to retain his place from the win over Argentina – fired across the keeper to win it for Croatia in injury time.
His side now face Denmark in the last 16 on Sunday, while Argentina will play France on Saturday.