Wales conjured two tries in the final four minutes to rescue victory from the jaws of defeat with a thrilling 31-24 win over Scotland in their Six Nations rugby clash at Cardiff's Millennium Stadium.
Scotland led 18-9 at the break with tries through John Barclay and Max Evans and had a 24-14 advantage entering the last five minutes, only to be undone by an extraordinary Welsh comeback on Saturday (Sunday morning NZ time).
Wales, beaten 30-17 by England in their opener last week, looked down and out until Leigh Halfpenny crossed with four minutes remaining.
Stephen Jones converted to reduce the deficit to three and then kicked a penalty in front of the posts to level after Phil Godman had been shown a straight red card for cynically taking out Lee Byrne.
With time just about expired, Wales regained possession from the kickoff and, with Scotland in disarray, Shane Williams found space to joyfully dive over the line.
The crestfallen Scots were left facing their second successive defeat after losing to France last weekend.
Andy Robinson's side had looked good for their first win in Cardiff since 2002 after outbattling the Welsh in contact and at the breakdown.
Scotland stunned the hosts with an eight-minute try, their first in four internationals which had Robinson applauding from his seat in the stands.
After failing to gain reward for the attacking enterprise against France, this score owed much to poor Welsh defence, James Hook and Gareth Cooper failing to halt Barclay in his tracks and the flanker slipped through their grasp to cross under the posts from 10 metres. Chris Paterson, in his 100th international appearance, added the conversion.
Jones got Wales up and running with a penalty but a drop goal from recalled flyhalf Dan Parks restored the seven-point lead.
Scotland continued to exert pressure. Rory Lamont's chip and chase put the hosts on the backfoot and from their next attack they extended their advantage further when Parks's grubber kick through sat up nicely for Max Evans to touch down in the corner.
Jones and Parks, taking over kicking duties after Paterson went off injured, then traded penalties.
The Scots were dealt another injury blow when a prone Thom Evans needed lengthy treatment for an apparent neck injury before being carried off on a stretcher.
Wales took advantage of the stop in play to regroup and for the last five minutes of the half enjoyed their best attacking spell, although a misplaced pass on the left touchline five metres from the line cost them the chance of an opening try. Wales won another penalty soon after and Jones reduced the deficit to 18-9 at halftime.
Parks landed a penalty from in front of the posts just seconds after the restart and the Scots thought they had scored a third try soon after when Kelly Brown scooted clear from a swift counter-attack but referee George Clancy brought back play for a forward pass.
Wales made the most of their letoff. Enjoying a good spell of possession they finally began to make inroads into the Scottish defence. Hook's rampaging run was halted but the ball was quickly recycled and Shane Williams produced a dashing run before feeding Byrne to score in the right corner with 55 minutes played. Jones missed the two-pointer.
A fine catch from Williams on his own line from a crossfield kick averted more Scotland danger but the 22 dropout was returned for a fine drop goal by Parks to increase his side's lead to 24-14.
It was then that Wales threw everything at their tiring opponents. Wing Halfpenny set up a thrilling finale with another try with four minutes remaining and after Jones had levelled following Godman's dismissal, they made the most of one final attack as time expired.
"Great credit to the guys as we know we didn't start well," Williams told the BBC. "Nothing seemed to go right but we stuck at it.
"We had the belief all the way through, as the game progressed we weren't pushing the points on as we wanted to but in the last 15-20 minutes we gave everything and I think we deserved the win. If that can't turn us round I don't know what can."
Scotland's man-of-the-match Parks said: "That's not justice, that's unreal. We did so much hard work for so long, it breaks your heart."
Wales beat Scotland 31-24 (halftime 9-18).
Wales: Tries: Lee Byrne, Leigh Halfpenny, Shane Williams; Conversions: Stephen Jones (2); Penalties: Jones (4)
Scotland: Tries: John Barclay, Max Evans; Conversion: Chris Paterson; Penalties: Dan Parks (2); Drop goals: Parks (2)
Referee: George Clancy (Ireland)