Wales manager Chris Coleman lost his first home game in charge as a goal in each half gave Bosnia-Hercegovina a comfortable win in Llanelli.
Miroslav Stevanovic robbed Neil Taylor to deliver the opener on a plate for Vedad Ibisevic.
Stevanovic doubled the lead early in the second half when a counter-attack exposed the Wales defence.
Joe Allen came closest for the hosts when his early shot was tipped onto the bar by Asmir Begovic.
There were few other openings from the home side, and certainly this was far from the performance the manager wanted.
The friendly was Wales' final match before their opening 2014 World Cup qualifying game against Belgium on 7 September.
Wales were sluggish in possession, and there was further evidence of their dependence on Gareth Bale to provide the attacking threat.
Bale offered only fleeting glimpses of his pace and power, although he rose well in the first half to force Begovic, the Stoke City keeper, to save well.
Apart from injured goalkeeper Wayne Hennessey, Coleman could have fielded his strongest line up.
He chose not to start with Steve Morison, however, who had become the regular starter in the lone striker role and Simon Church was on the left wing in place of Craig Bellamy.
Hennessey's replacement, Boaz Myhill, was called into action with only 30 seconds on the clock to save Edin Dzeko's rising shot from six yards.
Both sides hit the bar in the opening 16 minutes of a busy opening.
Allen was the first to be denied by a superb fingertip save from Begovic, and then Bosnia defender Boris Pandza crashed a header against the Welsh bar.
Wales were almost punished when only a crucial deflection prevented Dzeko from troubling Myhill again.
But there was no second let-off when Neil Taylor failed to clear on Wales' left flank to allow Stevanovic to create Bosnia's opener.
The winger's low cross into the six-yard box was comfortably converted by Ibisevic to give the visitors a deserved lead on 21 minutes.
He came within inches of doubling the advantage when Aaron Ramsey was caught in possession, but the Stuttgart forward shot wide with only Myhill to beat from inside the box.
Wales, who had won both previous visits to Parc y Scarlets, were off the pace for the start of the second half and the visitors profited again to score the second.
The home defence was horribly exposed by a quick counter-attack down Bosnia's right flank, allowing Stevanovic to run unopposed into the area before unleashing a thunderous shot to the far corner.
Bellamy, replacing the ineffective Church, added some late impetus but Begovic was again firm to save the Cardiff City winger's low drive.
Joel Lynch came on to make his Wales debut and Morison, another late substitute, headed wide from a corner.
But Bosnia, looking for a first win in seven games, looked the more likely scorers in the final stages, with the best chances falling to Dzeko.
The Manchester City striker troubled the home defence throughout and exemplified Bosnia's technical superiority.
Wales will need significant improvement when they host Belgium in Cardiff as they head into the first qualifier on the back of a third consecutive defeat.