BBC Scotland's chief sports writer in Stuttgart Arena
At the end, Steve Clarke stood at the edge of his technical area for an age, like a man surveying a wreckage - which in a way it was.
Angus Gunn was flat on his back in his own box. Jack Hendry was on his knees near the halfway line. Others were bent over with hands on knees or head in hands.
A few just stood there, motionless. Stunned, sickened, suckered and out of Euro 2024.
The footballing gods have had their fun with Scotland again. This twisted game of theirs never gets old, does it? Never.
We were deeper than deep into added time when the nightmare hit.
Scotland's desperation was acute. They were playing with what felt like 10 strikers at the time. Gunn had to be told to retreat at one point or else their shape would have been akin to a 0-0-11.
They had a huge penalty shout waved away not long before when Stuart Armstrong was taken out in the box.
Clarke was livid in the aftermath, but some of his comments about the Argentinian referee, Facundo Tello, were cringe-making. Bringing nationality into it was unwise.
The VAR official was Spanish, but there was no condemnatory language about Alejandro Hernandez from Clarke. It was all pretty grisly.
'Outcome the same, only year and city changes'
Scotland needed that break because their overall play was inaccurate and unthreatening. Same old, same old.
We reached the 97th minute and at last they had a shot on target, although even it was questionable given there may have been an offside in the preamble.
Grant Hanley had that chance, a close-range curler that was slapped away by Peter Gulacsi in the Hungary goal.
The loose ball broke to Callum McGregor, and only a heroic block denied him a crack from close distance.
Would the flag have gone up had the ball hit the net? Possibly. And you know the rest.
A late kick to the solar plexus. In Scotland's monumental pursuit of a place in the knockouts of a major tournament, the outcome is always the same.
The only thing that changes is the year and the city in which the horror show unfolds.
Hungary counter-attacked. Of course they did. Scotland were short on numbers. Of course they were.
A team that spent much of the night failing to put together much in the way of coherent attacking play suddenly turned into the Mighty Magyars of 1950s fame.
They were ruthless. When the ball fell to Kevin Csoboth, who had hit a post a few short minutes earlier, you closed your eyes and waited for the Hungarian roars, which came with an ear-splitting intensity.
In that moment, even the pathetic hope of two points being enough to qualify from third place was ripped away.
The hope of a set of results unfolding in other groups that would see Clarke’s team go through with two draws, an astonishingly low total of shots on target and no goal scored directly by one of their own players vanished in the Stuttgart night.
'Witless Scotland left to face bitter truth'
The truth is that Scotland had mountains of possession but not nearly enough wit to do anything of note with it.
Their xG at half-time - a stultifyingly dreary half it has to be said - was 0.00. At full-time it had creeped up to 0.13.
Hungary's was 1.02. Not exactly the stuff of Puskas, but it was enough for them and too much for Scotland.
They suffered the distressing loss of striker Barnabas Varga 20 minutes from the end. Varga was injured in a collision and was immediately surrounded by players, then medics, then a protective screen, before being taken away on a stretcher.
It was a chilling moment and it roused his team-mates.
They created some chances, they hit a post, they started to look slightly better than the mundane lot we had seen before. No wonder they celebrated wildly at the end.
Varga, you would imagine, was uppermost in their minds as they whooped and hollered in victory.
Sport's contrasting fortunes were writ large all over the pitch. Happy delirium at one end and total despair at the other.
Later, we heard the skirl of the pipes in the Tartan Army. Beaten but unbowed. The bagpipes - such a versatile instrument. Before kick-off they skirled in exultation and at the end they skirled in lament.
There will be dejection on a mass scale after this but there should be heavy doses of reality, too. The hope the Scots brought from Cologne and that draw with Switzerland to Stuttgart for the group denouement was fragile hope.
Everybody sounded optimistic, but it was heart ruling head, which is wholly understandable.
It was belief based on 90 minutes against Switzerland which was gutsy and a step-up from the calamity of Germany, but it was still nowhere near the level we saw from this team in qualification.
Scotland came into this game with one win in 11. They were a team who did wonderfully to win an invite to the big party but lost their way en route.
Their stats in terms of shots on target in this tournament are embarrassing - no other word for it.
Hungary were no great shakes. The Scotland of March to September last year would probably have found a way of putting them away.
This predictable and plodding version could not. And that is a bitter truth they will regret for a very, very long time.