A much-changed Wales side prepared for Sunday's World Cup play-off final with a commendable display in defeat against Poland in the Nations League.
With first-choice players such as Gareth Bale and Aaron Ramsey rested in Wroclaw, Wales' second string applied themselves well in a goalless first half against a full-strength home side.
Piotr Zielinski and Robert Lewandowski missed chances for Poland, while the dangerous Daniel James came closest to scoring for Wales.
Jonny Williams gave the visitors an unexpected lead with a superb low strike early in the second half, before Jakub Kaminski equalised with a fine finish and fellow substitute Karol Swiderski bundled in a late winning goal from close range.
Regardless of the result, Wales' chief concern for this fixture was keeping the squad intact for a greater goal on Sunday, and they accomplished that target.
Wales can now focus on the main event, a World Cup play-off final against Scotland or Ukraine which manager Robert Page has described as the "biggest match in Welsh history".
Wales' second string impress
Although this was Wales' first taste of the top flight in the Nations League, there was no doubting their priorities lay elsewhere.
The stakes could scarcely be higher for Wales when they host Scotland or Ukraine in the one-off tie, hoping to end their 64-year absence from football's showpiece tournament.
As a result, Page rested the vast majority of his first-team players in Poland, with Bale, Ramsey, Joe Allen and Ben Davies left out of the squad entirely.
The decision represented its own risks against seasoned opposition who had already qualified for the World Cup and were led by record scorer Lewandowski - but Page had little choice with the size of the prize on offer on Sunday.
His fringe players stepped up to the challenge admirably, keeping possession with control and troubling Poland on the break.
The hosts created the better chances in the first half, squandering the best in the fourth minute as the unmarked Zielinski headed wide from Mateusz Klich's cross.
Lewandowski then got his first sight on goal, bursting clear on the left before cutting inside and forcing Danny Ward into a brilliant low save.
Wales posed a threat too, most often through the pace and direct running of the irrepressible James.
Poland struggled to contain the Leeds United winger, who created opportunities for team-mates and missed one of his own as he shot wide from a promising position.
His half-time replacement Rabbi Matondo continued in the same vein, stretching the Polish defence early in the second half to set up Williams, who fired in from 20 yards.
The goal sparked Poland into life and they scored a deserved equaliser when Kaminski was given too much time and space inside the Wales penalty area to shift the ball on to his right foot and finish into the far corner.
Then with five minutes left, Lewandowski's shot took a big deflection, Wales failed to clear and Swiderski scored on the rebound to complete Poland's comeback.
Job done for Page
Page will already have a clear idea of the team he will select for the World Cup play-off and, while this game is unlikely to have changed his mind, the Wales manager will have been impressed by a number of performances.
Ipswich Town's Wes Burns looked at home on his debut at left wing-back, midfielder Dylan Levitt produced arguably his finest display yet in a Wales shirt and a new-look back three of Chris Gunter, Chris Mepham and Rhys Norrington-Davies coped admirably against quality opposition.
The electric James was substituted at half-time along with striker Kieffer Moore and goalkeeper Ward, with all three expected to play some part on Sunday.
Managing players' minutes and keeping his key men fit for the weekend was Page's aim in Wroclaw. To be able to do so while claiming a notable victory would have represented a job done to perfection.
Win, draw or lose, this game would not have had a bearing on Wales' place in history. Triumph in Sunday's date with destiny, and it will have all been worth it.
Line-ups
Poland
Formation 4-3-1-2
1Grabara
18Bereszynski15Glik5Bednarek19Puchacz
14Klich10Krychowiak6Góralski
20Zielinski
9Lewandowski7Buksa
1Grabara18BereszynskiBooked at 61mins15Glik5Bednarek19PuchaczSubstituted forZalewskiat 73'minutes14KlichSubstituted forZurkowskiat 60'minutes10KrychowiakSubstituted forGrosickiat 81'minutes6GóralskiSubstituted forKaminskiat 60'minutes20Zielinski9Lewandowski7BuksaSubstituted forSwiderskiat 73'minutesSubstitutes
2Kaminski3Wieteska4Kedziora8Zurkowski11Grosicki12Skorupski13Pestka16Swiderski17Szymanski21Zalewski22Dragowski23PiatekWales
Formation 3-5-2
12Ward
2Gunter5Mepham17Norrington-Davies
7Smith22Levitt16Morrell18Williams9Burns
13Moore20James
12WardSubstituted forHennesseyat 45'minutes2Gunter5Mepham17Norrington-DaviesBooked at 75mins7Smith22Levitt16MorrellBooked at 29mins18WilliamsSubstituted forThomasat 77'minutes9BurnsSubstituted forN Williamsat 62'minutes13MooreSubstituted forM Harrisat 45'minutes20JamesSubstituted forMatondoat 45'minutesSubstitutes
1Hennessey3N Williams4Denham6Rodon8Wilson10Thomas11Matondo14Roberts15Ampadu19M Harris21DaviesLive Text
Match ends, Poland 2, Wales 1.
Second Half ends, Poland 2, Wales 1.
Attempt missed. Matthew Smith (Wales) right footed shot from the right side of the box is too high following a corner.
Corner, Wales. Conceded by Kamil Glik.
Attempt blocked. Matthew Smith (Wales) header from the centre of the box is blocked. Assisted by Rabbi Matondo with a cross.
Foul by Robert Lewandowski (Poland).
Chris Mepham (Wales) wins a free kick in the defensive half.
Offside, Wales. Chris Gunter tries a through ball, but Mark Harris is caught offside.
Attempt missed. Chris Gunter (Wales) right footed shot from outside the box misses to the left. Assisted by Matthew Smith.
Foul by Piotr Zielinski (Poland).
Joe Morrell (Wales) wins a free kick in the attacking half.
Foul by Karol Swiderski (Poland).
Rabbi Matondo (Wales) wins a free kick on the right wing.
Foul by Kamil Grosicki (Poland).
Neco Williams (Wales) wins a free kick on the left wing.
Goal! Poland 2, Wales 1. Karol Swiderski (Poland) right footed shot from very close range to the centre of the goal.
Attempt blocked. Robert Lewandowski (Poland) right footed shot from the left side of the box is blocked. Assisted by Jakub Kaminski.
Robert Lewandowski (Poland) wins a free kick in the attacking half.
Foul by Chris Mepham (Wales).
Attempt missed. Piotr Zielinski (Poland) left footed shot from outside the box misses to the left. Assisted by Szymon Zurkowski with a headed pass.