Ireland departed Murrayfield with the RBS 6 Nations victory they desperately needed, but only after narrowly surviving a second-half fightback from Scotland.
Tries from Jamie Heaslip, Eoin Reddan and Ronan O'Gara, who also landed three conversions, helped Declan Kidney's side into a 21-9 lead with 25 minutes to go.
But Scotland, encouraged by the visitors failing to make more of their chances, staged a revival with Chris Paterson kicking two penalties and Dan Parks nudging over a drop-goal.
They camped in the Irish half for much of a tense final quarter but lacked the cutting edge to breach the whitewash.
Scotland contributed heavily to their third successive defeat of the championship, a result which keeps them on course for a wooden spoon decider against Italy on March 19.
Their inability to prevent Heaslip strolling over for the simplest of scores was desperate and they were further damned by the absence of any defence at all for Reddan's try.
But coach Andy Robinson, who made seven changes for the match - three enforced - can at least take solace in the spirit on display.
Ireland appeared to have reclaimed some of their swagger as O'Gara cantered over, but their alarming disintegration when Scotland upped the tempo was symptomatic of a team short on self-belief.
Mixed messages over the team's confidence levels had emerged from the Irish camp all week, but this performance will have done little to lift morale.
It all looked so different as they made a roaring start with just five minutes on the clock and strolled over for the opening try.
A five-metre line-out catch and drive was recycled several times before Rory Best, who sucked in two defenders, sent Heaslip over for a simple try.
O'Gara landed the conversion but Scotland replied with a penalty from Paterson following some hard running in the approach play.
Paterson had taken over the kicking duties from Ruaridh Jackson, who missed an earlier long-range shot at goal, and his side were rewarded with a second penalty shortly after.
Ireland were frequently being penalised by referee Nigel Owens, but when the Scots infringed, O'Gara missed the uprights.
Owens needed to intervene at a series of a scrums on the halfway line but Scotland soon turned the ball over after being awarded a penalty.
One wonderful O'Gara touchfinder and panic-stricken line-out later and the Irish had secured a five-metre scrum which yielded their second try.
The Scots were shoved backwards and Heaslip peeled free before Reddan ripped the ball from his arms and scampered through a non-existent defence.
Scotland, who had fought back with conviction from their early deficit, were reeling at having conceded so easily once more, with O'Gara's conversion rubbing salt into the wound.
The defence buckled again when Ireland renewed their assault but O'Gara was penalised close to the line for not releasing.
Sean Lamont executed a try-saving tackle on Keith Earls to end a first half dominated by the Irish.
Scotland's problems deepened when prop Allan Jacobsen was sent to the sin-bin after another scrum collapsed.
A forward pass prevented Sean O'Brien from capitalising on Reddan's break but the Leinster blindside was soon back on the charge.
Two rampaging runs swept Ireland into the 22, the second sending tacklers flying like skittles, only for an infringement at the breakdown to kill the move.
It was only a matter of time before the third try arrived, however, and in the 53rd minute O'Gara dashed over after Cian Healy had made inroads into the home defence.
O'Gara converted before Paterson slashed the deficit to 21-15 with two penalties as the home side threatened a fightback.
Their tails up, Scotland attacked with belief with winger Max Evans nearly wriggling free.
A drop-goal from substitute Dan Parks made it 21-18 only for two knock-ons to halt their momentum.
The Scots had not given up hope but Ireland's defence and discipline held firm, leaving the visitors to wonder how they had been taken so close.