A penalty shoot-out defeat - the same outcome as against Poland in the Euros choker of two years ago - meant it was Bosnia-Herzegovina who progressed to the final.
After Brennan Johnson and Neco Williams both failed to score from the spot, the Bosnians recovered calmly from missing the opening kick to claim a 4-2 penalties victory and the reward of a final qualifier against Italy.
For Wales there is the awful sourness not just of a missed opportunity, but of a horrible conference of the vanquished at home to Northern Ireland on Tuesday night.
At least this match had new victims of the penalty curse. Two years ago, it was Dan James who was unable to score as Wales went out.
This time, Johnson - who has had a difficult time lately with Crystal Palace - and Williams, an in-form presence for Nottingham Forest - were the unfortunate fall-guys.
James had looked the likely hero when he put Wales 1-0 ahead just after half-time.
But the veteran Edin Dzeko equalised in the 86th minute and after neither side were able to score in extra-time, it was the Bosnians who found steady nerves when they needed them most.
Like a fully pumped ballon leaking air, the energy seemed to leave Wales somewhere midway through the second-half and continued to seep out all the way to the shoot-out.

This will be a difficult pill to swallow for head coach Craig Bellamy in his first campaign in charge and the consequences of not making back-to-back World Cups will be financial as well as psychological.
Bellamy had picked an attacking line-up with Harry Wilson, David Brooks and Dan James as a fluent trio behind Brennan Johnson.
It was a show of faith in Johnson, who has struggled for game time - as well as goals - at Crystal Palace, but his time as a lone striker against a physical Bosnian defence did not last long before he moved himself to an orthodox left wing spot.
That left Wales with Wilson playing in an unfamiliar false nine position, but such has been the Fulham player’s outstanding form this season that it felt almost inevitable that Wales’ nearest effort of a goalles first-half should be provided by him.
Both James and Brooks had looked lively in a confident opening but it was not until midway through the half that Wilson curled the ball in a looping arc from the edge of the penalty area, only to see it crash against the junction of post and crossbar.
Ethan Ampadu tried to force home the rebound, but was sent sprawling by couple of Bosnian defenders, but Welsh appeals for a penalty were waved away by Romanian referee Istvan Kovacs.
Bosnia were resilient and organised in defence, but occasionally brutal and the three yellow cards they picked up before the break felt like a cost that could ultimately prove expensive.
Their attacking threat, however, was limited to a couple of promising moments from Amar Memic, but very little from their 40-year-old talisman, Edin Dzeko who was comfortably contained by the Welsh pairing of Joe Rodoon and 20-year-old Dylan Lawlor.
Although it was goalless at half-time, Wales would have felt more satisfied with the balance of the game and they finally forced the opening they craved six minutes after the re-start.

It came from a Bosnian mistake when Benjamin Tahirovic mis-hit a pass straight to James. The Leeds United winger headed into his own path to produce a rapid counter-attack and then produced a vicious, unexpected half-volley from 25 yards out which flew past Nikola Vasilj.
Just like four years ago - when Gareth Bale produced his decisive second play-off goal in the semi-final against Austria - the Cardiff City Stadium erupted into a joyous frenzy.
Now trailing with a little over half an hour remaining, Bosnia were forced to commit more players to attack and they almost found reward when Ermedin Demirovic sent a shot flashing over the bar.
Having finally shed their caution, the Bosnian re-set left more space for Wales - and particularly James - to hit them on the break.
On the hour mark, Wilson carried the ball forward before releasing James. The winger turned inside his marker and then out, but this time his left foot shoot thundered against the underside of the bar and the visitors scrambled the ball clear.
It would prove a decisive moment within the 90 minutes, but not before Wales goalkeeper Karl Darlow producde a more breathtaking moment of his own.
When Dzeko used all his experience to head the ball back across goal to Demirovic, it looked as if his fellow striker was certain to head home an equaliser from six yards out.
Yet somehow, Darlow dived at full stretch to palm away a ball that appeared to have already gone past him.
It felt like the kind of miraculous save that might take a country to a World Cup finals, a hand of destiny, especially when Bosnia’s next efforts were not as well-placed.
But with four minutes remaining, another header by Dzeko left Darlow having to pick the ball out of his net.
A corner from the left found the former Manchester City striker unmarked and he buried the opportunity to make it 1-1.
Both sides had chances in a frantic period of added time, but it remained level and suddenly Wales were into extra-time - just as they were two years ago in the European Championship play-off against Poland.
With substitute Sorba Thomas now Wales’ main threat on the left flank, Wales continued to be the team doing most of the pressing.
But a combination of weariness and half chances snatched at, rather then seized, meant the extra 30 minutes passed mostly in agonised frustration.
So, it came down to penalties - just as it had two years against the Poles.
Same edgy ending, same bitter outcome.






