Scotland recorded their first loss of the Glasgow Sevens as they were pipped at the post by Wales with a noisy home crowd backing them at Scotstoun.
Ranked seventh going into the tournament, Wales were favourites for this game but the Scots couldn't over turn the powerful Red Dragons.
Wales broke the deadlock with an easy try after four minutes of play. Scotland answered brilliantly, with winger James Fleming's blistering try to take the score to 5-7 to the Scots.
The crowd were in great spirits, especially in the party stand, but just before the break Wales made it 12-7.
Scotland's hard defensive efforts paid off in the second half, as a turnover soon turned into a graceful second try from James Fleming, taking the score to 12-14 with three minutes to play.
The Welshmen scored with a minute left on the clock, leaving the crowd rather disheartened.
They broke down the Scottish defence well and barged over the white line for a try, taking the score to 17-14.
A tense finale saw Wales hold on for the win with the Scots forced to settle for a losing bonus point.
Scotland still have to play South Africa and Russia in the last two games in Pool D.