Wales staged a remarkable fightback to win 31-24 and inflict torture on Scotland at the Millennium Stadium.
The home side looked down and out when it trailed 24-14 with only three minutes of normal time left, but tries by Leigh Halfpenny and Shane Williams - his 49th for Wales - clinched an astonishing win.
Scotland looked to have done enough to reduce Wales' Six Nations title hopes to ruins by ending an eight-year wait for victory in Cardiff, but it ended the game with 13 men after substitutes Scott Lawson and Phil Godman were sin-binned in rapid succession.
First five-eighths Dan Parks delivered a supreme tactical display that also included two dropped goals and a penalty double, while flanker John Barclay and substitute wing Max Evans scored first-half tries and Chris Paterson slotted a conversion.
But Wales, which had earlier claimed a Lee Byrne try, prevailed as first five-eighths Stephen Jones kicked 16 points, leaving Scotland crestfallen following two successive Six Nations defeats.
It was rough justice on the Scots, who dominated most of the game in arguably their most complete performance during Andy Robinson's coaching reign.
However, they could not finish Wales off, despite having it on the ropes for so long, as the home side completed one of Six Nations rugby's greatest comebacks.
Paterson led Scotland out, in tribute to him becoming the latest member of Test rugby's 100-cap club, joining such illustrious names as George Gregan, Philippe Sella and David Campese.
An open stadium roof - a rarity these days for Wales home games - revealed a leaden sky, but no sign of the rain which Wales boss Warren Gatland suggested Scotland had been hoping for.
The Scots quickly showed they did not require wet weather to assist them tactically as they stunned Wales with a ninth-minute try.
Paterson, who had received lengthy treatment for a knock to his shoulder, regained his feet in time to see Barclay smash through the combined defence of James Hook and Gareth Cooper.
Barclay's power was too much for them as he sprinted over for Scotland's first try since its opening autumn Test victory over Fiji three months ago.
Paterson added the conversion - his 35th successful Six Nations kick in a row - and blundering Wales could have few complaints at an early seven-point deficit.
And it got worse for the home side, despite Jones opening its account with a 15th-minute penalty.
Wales was horribly disorganised in defence, and Scotland took advantage with a second try after Parks played the role of creator following a neat dropped goal.
His clever kick behind the Welsh defence saw Max Evans - on the field as a replacement for his brother Thom - react quickest and ground possession just before the dead-ball line.
Referee George Clancy needed confirmation from television match official Geoff Warren before the try was awarded, and although Paterson's long kicking sequence ended through a missed conversion, Scotland quickly extended its lead.
Parks cancelled out Jones' second penalty for an 18-6 advantage, and Paterson then departed the action with Evans returning as a permanent, rather than temporary, substitute.
It was a sad way for Paterson's afternoon to end, yet he would have been thrilled with Scotland's dominant performance as he made his way off.
Wales pressed in search of a try, but the game was held up when wing Thom Evans suffered a serious-looking leg injury following a shuddering