The side trailed with five minutes to play but two strikes during that period – from Simon Church and Ched Evans means that they are just one victory away from the play off – and that could come in their next match at home to Romania in August.
Both Swans stars in the squad played in the game although Joe Allen was replaced on 77 minutes
Bosnia-Herzegovina U21: Buric, Colic, Benovic, Cejvanovic, Covic, Likic, Jelic, Aganovic, Zec, Dialiba, Zivkovic.
Subs Not Used: Sehic, Handzic, Puric, Masic, Papaz, Huseinovic, Stokic.
Goals: Dialiba 58.
Wales U21: fon Williams, Gunter, Rhys Williams, Mike Williams, Jacobson, Allen (Brown 77), Ramsey, MacDonald, Collison, Evans, Vokes.
Subs Not Used: Taylor, Basey, Bradley, Church, Edwards, Wilson.
Booked: Vokes.
Goals: Church 86, Evans 88.
Ref: Alexey Kulbakov (Belarus).