Greig Laidlaw kicked four penalties as Scotland continued their resurgence by inflicting a maddening defeat on Ireland in today's RBS 6 Nations clash at Murrayfield.
The Scots trailed 3-0 at half-time but should have been dead and buried, with Ireland enjoying an extraordinary advantage in possession and territory only to be hamstrung by poor decision-making and inaccuracy in the 22.
When wing Craig Gilroy scored the match's only try in the 44th minute, the Irish finally seemed ready to reflect their dominance on the scoreboard.
But the score inspired battered Scotland, and Scott Johnson's players launched a stubborn fightback that drained the confidence from their opponents and renewed their own self-belief.
Laidlaw's flawless kicking swept them clear as they celebrated their first back-to-back wins in the Six Nations since 2001, having routed Italy two weeks ago.
Injury-depleted Ireland's decision to play uncapped Ulster duo Luke Marshall and Paddy Jackson produced mixed results, with the former enjoying a strong debut and the latter a harrowing afternoon.
Marshall's powerful running at inside centre was a key feature of his side's attack and he looked comfortable at this level, although at times he was aided by weak defending.
But Jackson, chosen ahead of substitute Ronan O'Gara at fly-half, missed eight points from the kicking tee and was replaced by the Munster veteran with 15 minutes to go.
The change in personnel failed to stop the rot, leaving Ireland to wonder how they managed to lose a game they should have won comfortably, and it is a result that increases the pressure on coach Declan Kidney.
Jackson's first touch was a knock-on of Conor Murray's pass but the next was far more accomplished as he showed smart footwork to break the gain-line.
Referee Wayne Barnes was heavily involved in a opening that burst into life when Marshall powered between two weak tackles before sending a long pass to left wing Keith Earls.
Earls was held up just short of the line and then Brian O'Driscoll was kept out in virtually the same spot.
Ireland failed to capitalise on an attacking line-out, but it did not matter as Marshall surged through the midfield for a second time.
Once again he looked to find his wing, but this time he should have gone it alone with the whitewash beckoning and his pass fell harmlessly at the feet of Gilroy.
Scotland lost prop Ryan Grant to the sin bin for failing to retreat 10 metres at a free-kick, but Jackson was off-target with his first shot at goal.
The error count and frequent intervention of Barnes robbed the match of momentum, but in the 25th minute Ireland were back on the offensive when a switch with Jackson sent Earls hurtling into space.
Crucially, however, he isolated himself from the supporting O'Driscoll and was scolded by his former captain as a result.
Full-back Stuart Hogg and wing Sean Maitland showed quick thinking to steer Scotland out of their 22, only for a forward pass to centre Matthew Scott to end their best passage of play.
Finally Ireland, who had dominated the preceding 35 minutes, were off the mark courtesy of a Jackson penalty that came after the Scottish line had been vigorously tested.
For all their possession, however, they led only 3-0 and would have seen that slip had Hogg's long-range penalty on the stroke of half-time not fallen inches short.
The try they desperate needed arrived through Gilroy three minutes after the break with the strength of O'Brien cracking the Scottish defence to start the move.
Full-back Rob Kearney was heavily involved before the ball was slipped to Gilroy on the blindside and the Ulster wing span before touching down.
Jackson missed the conversion and then a penalty, contrasting with Laidlaw who slotted three points from in front of the posts.
Scotland were playing with far greater conviction and urgency, with Maitland almost wriggling through, and when Ireland's scrum crumbled Laidlaw landed a second penalty.
The momentum of the game had shifted completely and suddenly it was Scotland who were in control, a fact rewarded when Laidlaw nudged them ahead for the time as the final 15 minutes beckoned.
Ireland could see the match slipping from their grasp and responded by replacing Jackson with O'Gara, but his missed clearance only invited more pressure.
Substitute David Kilcoyne conceded a penalty and Laidlaw obliged, and a grandstand finish was set up when the Scots infringed in front of the posts and O'Gara kicked for the corner.
The stage was set for Ireland to snatch victory, but O'Driscoll ran into his own player and Scotland were awarded a five-metre scrum.
There was still time for one throw of the dice, however, when the Scots conceded a penalty at the set-piece in injury-time, but Marshall knocked on in midfield and the game was over.
Scotland squad's player ratings:
STUART HOGG: Handed over the kicking duties to Greig Laidlaw after his first-half miss but was invaluable as a last line of defence - 7/10.
SEAN MAITLAND: Everyone knows the attacking he poses but proved he is just as strong at the back as he halted Brian O'Driscoll to prevent early try - 6.
SEAN LAMONT: The Glasgow man had to front up to the likes of O'Driscoll as Ireland dominated in the first half but did not let his side down - 6.
MATT SCOTT: Edinburgh centre showed a maturity beyond his 22 years as the Scots survived an early battering - 6.
TIM VISSER: Was expected to be the Scots' main attacking threat but barely saw the ball - 5.
RUARIDH JACKSON: Stand-off could not make any great territorial gains and was instead required to find touch just to keep his team out of trouble - 5.
GREIG LAIDLAW: The hero of the day with four perfect kicks to hand Scotland victory - 9.
RYAN GRANT: Brought in to add physicality to Scotland's pack and played an important part - 7.
ROSS FORD: Effective at the set-piece as Scotland held up Ireland's desperate pack - 7.
GEOFF CROSS: Euan Murray's stand-in proved himself no lesser an option as he scrummaged with dominance - 7.
RICHIE GRAY: Had to do the dirty work as Ireland drove on time and again but was magnificent in the role - 8.
JIM HAMILTON: Determined at the set-piece driving Scotland forward, he epitomised the team's determination not to lose - 8.
ROBERT HARLEY: Off early as he was momentarily treated for a cut to the head but returned to drive Scotland on with real guts - 7.
JOHNNIE BEATTIE: Unable to lead the charges with his usual style but stayed calm as the battle got frantic - 6.
KELLY BROWN: The skipper simply led by example, tackling everything in sight - 8.
DOUGIE HALL: Brave in the tackle - 6
MORAY LOW: Played brief part - 5.
ALASTAIR KELLOCK: Stood strong in dying moments - 6.
DAVID DENTON: Had to be resolute at the end - 6.
DUNCAN WEIR: Positive display - 6.