Edinburgh fell to their first defeat of the season on Saturday, after Chris Paterson missed a penalty with the last kick of the game.
Despite scoring the only try of the night, the home side were sunk by six penalties from the boot of Leinster's Fergus McFadden and a drop goal from John Sexton in the final minute.
Chris Paterson's final kick of the game to win the match fell just short.
Edinburgh were looking for their fourth win in a row but with Leinster having their Lions back in harness it was never going to be easy.
Leinster opened the scoring with a McFadden penalty after three minutes but four minutes later Paterson levelled.
The home side looked the more likely to go ahead with Ben Cairns and Nick De Luca dangerous in midfield, but solid hits from Jamie Heaslip and Nathan Hines stopped a couple of attacks when the try looked on.
On the half-hour mark, Paterson put Edinburgh ahead but McFadden pulled them level on the half-time whistle with his second penalty.
The Leinster kicker slotted two more penalties in the first 10 minutes of the second half to open a gap but on 56 minutes Edinburgh grabbed the only try of the night.
Ally Hogg started the move off the back of the scrum and the ball was worked to Cairns, who shrugged off a couple of tackles to crash over.
Paterson's conversion took Edinburgh into a one-point lead but McFadden took advantage of Edinburgh indiscipline to slot a further two penalties and Leinster desperately defended their lead.
In a frantic final 10 minutes, Paterson banged over two penalties to give Edinburgh the lead again at 19-18, but straight from the restart Sexton dropped a goal to put Leinster back ahead.
Pens: Paterson 4
Pens: McFadden 6
Drop goal: Sexton
Edinburgh: 15 Chris Paterson, 14 Mark Robertson, 13 Ben Cairns, 12 Nick De Luca, 11 Tim Visser, 10 Phil Godman, 9 Mike Blair (c), 8 Ally Hogg, 7 Roddy Grant, 6 Alan MacDonald, 5 Scott MacLeod, 4 Craig Hamilton, 3 Geoff Cross, 2 Ross Ford, 1 Kyle Traynor.
Replacements: 16 Andrew Kelly, 17 Alan Jacobsen, 18 Ryan Grant, 19 Steve Turnbull, 20 Scott Newlands, 21 Greig Laidlaw, 22 John Houston.
Leinster: 15 Rob Kearney, 14 Shane Horgan, 13 Fergus McFadden, 12 Gordon D'Arcy, 11 Luke Fitzgerald, 10 Shaun Berne, 9 Eoin Reddan, 8 Jamie Heaslip, 7 Sean O'Brien, 6 Kevin McLaughlin, 5 Nathan Hines, 4 Leo Cullen, 3 Stan Wright, 2 John Fogarty, 1 Cian Healy.
Replacements (from): Bernard Jackman, Mike Ross, Devin Toner, Shane Jennings, Dominic Ryan, Simon Keogh, Jonathan Sexton, Girvan Dempsey.
Date: Saturday, September 26
Kick-off: 18.30 BST
Referee: Tim Hayes (WRU)
Assistant Referees: Graham Knox (SRU), Bob Nevins (SRU)
TMO: Jim Yuille (SRU).