Wales were given a thorough work-out by a technically superior Basque XI on Sunday night in Bilbao but emerged victorious thanks to Ryan Giggs.
Ryan Giggs' breakaway goal proved decisive in Bilbao
Playing his first friendly for Wales away from home, Giggs launched a length of the field counter-attack in the last quarter-hour to poke home the winner.
Lewin Nyatanga impressed in defence for Wales, while Craig Bellamy also shone.
The Euskari dominated at the Estadio San Mames with some slick passing, but they lacked Wales' edge in attack.
Wales coach John Toshack, still revered in Basque country thanks to his time as Real Sociedad boss, is always at ease in his adopted homeland.
But his current players took some time to get to grips with Jose Angel Iribar's skilful Basque side.
They have lost only one of their previous 13 games over 13 years, and select homegrown players from Bilbao, Alaves, Sociedad and Champions League qualifiers Osasuna.
The hosts were almost ahead after just five minutes when captain Julen Guerrero rounded Wales goalkeeper Paul Jones and fired at an empty net.
But Norwich midfielder Carl Robinson had read the danger and hurled himself at the ball for a stunning goal-line clearance.
The Euskari continued to threaten and went close again on 19 minutes when Edu Alonso crossed from the right, only for Joseba Etxeberria to nod wide from six yards.
Injuries and withdrawals had seen Wales lose several full-backs in the last few weeks, forcing Toshack to play with three at the back and use Simon Davies and Joe Ledley as wing-backs.
But the pressure exerted by the Basques saw the pair pushed further and further back, having a knock-on effect of leaving Wales short-handed and overrun in midfield.
Wales striker Craig Bellamy caused problems for the Basques
After a half-hour of worry, Wales did manage to exert some pressure of their own and only a fine save from Inaki Lafuente denied Bellamy as the Blackburn striker shot low across goal.
The Basque's Bolton defender Ivan Campo was fortunate to escape with just a booking for hauling back Bellamy as he threatened to break clear.
Then from a corner Rob Earnshaw headed just over, with the Norwich hit-man testing Bilbao keeper Lafuente twice more before the break.
Earnshaw ignored the better-placed Bellamy for the second of those, deciding instead to shoot from a tight angle.
But the Canary showed much better awareness soon after half-time, chesting down Bellamy's cross and setting up a gilt-edged chance for Giggs who somehow shot wide.
That was Earnshaw's last contribution, Gillingham's Andrew Crofts coming on to take up station in midfield and Giggs moving up to partner Bellamy in attack.
Basque replacement striker Fernando Llorente added a much-needed physical focal point, and the Bilbao player soon looped a header across the face of goal.
But Wales were more composed, with 17-year-old Derby defender Nyatanga growing in stature as the game progressed.
Etxeberria and Patxi Punal were both wide with long-range efforts for the Euskari, who were still dominating with their smooth passing.
Then on 75 minutes Wales caught their hosts with a sucker-punch, as Giggs made up for his earlier miss.
As the Basques appealed hopefully for a dubious penalty shout, the Wales skipper collected the ball deep in his own half and set off on a trademark mazy run.
Bellamy and Crofts made good runs left and right to take defenders away and, as the Basques stood off, Giggs toe-poked the ball home past replacement keeper Asier Riesgo.
Xabi Prieto went close to an equaliser with a chip from a tight angle on the right that sailed just over the bar.
That was the home side's last real chance to rescue a draw, and perhaps the Basques should have ended further behind when Wales substitute David Cotterill was clipped late in the penalty area.
Basque XI: Inaki Lafuente (Bilbao), Edu Alonso (Alaves), Aitor Lopez Rekarte (Sociedad), Ivan Campo (Bolton), Mikel Labaka (Sociedad), Patxi Punal (Osasuna), Xabi Prieto (Sociedad), Julen Guerrero (Bilbao, capt), Joseba Etxeberria (Bilbao), Mikel Alonso (Sociedad), Igor Gabilondo (Sociedad). Subs: Asier Riesgo (Sociedad), Josu Sarriegi (Alaves), Inaki Munoz (Osasuna), Javi Garrido (Sociedad), Fernando Llorente (Bilbao).
Wales: Paul Jones (QPR), Joe Ledley (Cardiff), Lewin Nyatanga (Derby), Danny Gabbidon (West Ham), James Collins (West Ham), Carl Robinson (Norwich), Carl Fletcher (West Ham), Craig Bellamy (Blackburn), Rob Earnshaw (Norwich), Simon Davies (Everton), Ryan Giggs (Man Utd, capt). Subs: David Partridge (Bristol City), Andrew Crofts (Gillingham, for Earnshaw 56), David Vaughan (Crewe), David Cotterill (Bristol City, for Robinson 72), Gareth Bale (Southampton), Craig Davies (Verona), Lewis Price (Ipswich).
Referee: Eduardo Iturralde Gonzalez (Spain).