Isa Nacewa's 100% place-kicking return was the difference between the sides as Leinster squeezed past their provincial rivals Connacht in the RaboDirect PRO12.
Although Connacht had the better of a slow-burning first half, three penalties from man-of-the-match Nacewa nudged Leinster into a 9-3 lead at the break.
Connacht took advantage of sin-binnings for Isaac Boss and Leo Cullen as they created tries for Tiernan O'Halloran and South African Ethienne Reynecke.
But Matthew Jarvis and replacement Miah Nikora missed both conversions, with the latter also watching his last-gasp drop-goal fall under the crossbar in a dramatic finish.
Gunning for their first win in 12 outings, Connacht showed early signs of intent in front of a league-record crowd of 6,582 at the Sportsground.
The best move came when an in-form O'Halloran split open the Leinster defence on an eye-catching counter-attack.
Jarvis, a late inclusion in the starting line-up, missed his first shot at the posts in the sixth minute and was wayward from further out five minutes later.
But the young out-half was then successful with a 35-metre effort, punishing Leinster for bringing down a maul illegally.
Leinster were quick to respond, drawing a ruck infringement from John Muldoon which resulted in Nacewa slotting over his first penalty.
Another sweetly-struck kick into the wind from Nacewa, this time from 38 metres out, moved Joe Schmidt's men in front despite Connacht controlling much of the play.
Defences were on top in the period leading up to half-time and it took a muscular drive from Rhys Ruddock to tee up Nacewa's third penalty.
Backchat led to referee John Lacey moving the penalty into kickable range and the full-back managed to squeeze his attempt inside the left-hand post.
The Leinster pack built some momentum before the break, however an important steal by Ronan Loughney helped the home side clear the danger.
Connacht were back on the defensive in the early part of the second half, Nacewa maintaining his impressive form with a precise 49th-minute kick.
The arm wrestle up front continued, with a number of promising phases strangled into submission by the sheer force of the tackling.
The sin-binning of Boss for interfering with Frank Murphy's pass from a midfield ruck gave Connacht a chance to hit back - and they duly did with O'Halloran getting over.
A string of quick passes created the space on the right with Jarvis putting O'Halloran over just moments after fellow winger Brian Tuohy was stretchered off.
The try was unconverted though, and Nacewa soon struck his fifth penalty goal of the night to move the league leaders 15-8 clear.
But Connacht stuck doggedly to their task and with Cullen carded for taking out a lifter at a five-metre lineout, Reynecke charged over off a subsequent maul.
Nikora slipped as he tried to convert from a right-sided position and agonisingly the New Zealander had the accuracy but not the distance when attempting that drop-goal at the death.