Wales laboured to a Euro 2008 qualifying win over San Marino after failing to build on an early lead.
Wales found it tough going to break down the San Marino defence
Rob Earnshaw gave Wales the perfect start by scoring the opener on 13 minutes from Craig Bellamy's pass.
Bellamy's low cross then gave Joe Ledley a simple tap in to double Wales' lead 10 minutes before half-time.
But Wales lacked intensity after the break and Andy Selva pulled a goal back for San Marino, who had a man sent off late on, with a fine free-kick.
With the stinging criticism from manager John Toshack still ringing in their ears after the defeat to Cyprus on Saturday, an early goal was exactly what the Wales players needed to settle any potential nerves.
Bellamy fired the first warning shot when he forced Aldo Simoncini to save low down, and then Earnshaw lifted Welsh spirits a minute later as he broke the deadlock with his first shot on goal.
Ledley found Bellamy in space just outside the penalty area, and his pass was perfectly weighted for Earnshaw's run into the box and his first-time effort went in off the legs of the home goalkeeper.
Earnshaw, making his first start in a competitive match for over a year, twice had the ball in the back of the net before half-time but his celebrations were curtailed by the referee's whistle.
The first was correctly ruled out for offside but he was unfortunate for the second on 34 minutes when his challenge on Simoncini was penalised as the goalkeeper fumbled a looping cross.
With David Vaughan brought in on the left, Ledley was pushed into a central midfield role and the Cardiff man was the star performer of a totally dominant first-half.
Only a superb save from Simoncini kept out his 18-yard drive, but the 20-year-old was soon celebrating his first goal for Wales.
Again Bellamy was the creator as his low pass across the six-yard box, after a neat one-two with Simon Davies, found Ledley unmarked at the far post for a simple tap in.
Lewis Price, preferred to Danny Coyne in goal, was forced to make two saves in quick succession after the break as Wales failed to rediscover the high tempo of the first half.
It took Wales until the 66th minute to threaten the San Marino goal again when Bellamy's left-footed shot was deflect into the side netting.
But Wales' lacklustre display was penalised moments later when San Marino embarrassed Toshack's men by halving the deficit.
Sam Ricketts, who had replaced David Vaughan, was penalised for a foul on the edge of the Wales penalty box and Selva fired a superb effort into the top corner with Price rooted to his spot.
It was only San Marino's second goal in the qualifying campaign and one their limited quality and attacking intent hardly deserved.
Wales failed to find the desired response as they struggled to break down a determined San Marino defence for the final 15 minutes.
Not even a second yellow card for home defender Nicola Albani five minutes helped their cause, although Bellamy did force another fine save from Simoncini in injury time.
San Marino: Aldo Simoncini, Carlo Valentini, Vannucci (Bugli 76), Albani, Della Valle, Bonifazi (Bonini 62), Davide Simoncini, Muccioli, Andreini, De Luigi (Matteo Vitaioli 80), Selva.
Subs Not Used: Federico Valentini, Benedettini, Bollini, Nanni.
Sent Off: Albani (85).
Booked: Carlo Valentini, Albani, Vannucci, Matteo Vitaioli.
Goals: Selva 73.
Wales: Price, Bale, Eardley, Gabbidon, Nyatanga, Robinson, Vaughan (Ricketts 62), Davies, Ledley, Earnshaw, Bellamy.
Subs Not Used: Coyne, Evans, Crofts, Morgan, Easter, Eastwood.
Booked: Bale, Ledley, Ricketts.
Goals: Earnshaw 13, Ledley 36.
Ref: Anthony Zammit (Malta).