A battling perform-ance from Edinburgh made Leinster sweat before they finished top of the RaboDirect Pro12 table for the fourth time in seven years.
The province will enter the play-offs as top seeds, but they will want to forget this error-strewn encounter as Edinburgh, who were hammered by Munster last week, finished just two points in arrears.
Indeed, Edinburgh led 6-5 at the interval thanks to two Greig Laidlaw penalties, with a try from young flanker Jordi Murphy in between them, but Leinster, turning with the wind behind them, had the better of the second period.
Jimmy Gopperth landed a penalty and converted Dave Kearney's 57th-minute touch down to get Leinster over the finish line, albeit with Tim Visser's converted try making them sweat right until the end.
Injury-hit Edinburgh lost winger Sam Beard to an early knock, but hit the front thanks to an opening penalty from the Gloucester-bound Laidlaw.
Leinster replied within four minutes, Gordon D'Arcy and Dave Kearney combining to good effect on the left wing before Murphy spun out of Dave Denton's challenge to plunge over from close range.
Gopperth missed the conversion and after Richard Strauss had to hobble off, Leinster had a let-off when Carl Bezuidenhout's try was ruled out for a forward pass from Visser.
Having leaked 55 points to Munster, Edinburgh looked a very different team here and frustrated the hosts for much of the first 40 minutes.
The Scots were severely hampered by two more injuries as No 8 Denton and centre Matt Scott were forced off in quick succession.
But they dug their heels in and pressed from turnover ball with prop Willem Nel just held up by Leinster's retiring duo Leo Cullen and Brian O'Driscoll.
Edinburgh managed to edge in front for the break as O'Brien infringed at a ruck close to the Leinster line and Laidlaw tapped over the three points.
Gopperth's 51st-minute penalty was all the home side had to show for a concerted spell of pressure, but the second try eventually came at the end of the third quarter.
Gopperth's inviting pass sent Dave Kearney darting past two covering defenders to score just to the right of the posts, with the conversion quickly added for 15-6.
There was no sense of Edinburgh surrendering though and a smart break from talisman Laidlaw released Visser for a well-worked try in response. The scrum-half's conversion made it a two-point game again.
But off-colour Leinster held firm to secure home advantage in the semi-finals, where they will face provincial rivals Ulster.
Leinster: R Kearney, McFadden, O'Driscoll, D'Arcy, D Kearney, Gopperth, Boss, J McGrath, Strauss, Ross, Cullen, McCarthy, O'Brien, Murphy, J Heaslip.
Replacements: Macken for R. Kearney (63), Madigan for D'Arcy (67), L. McGrath for Boss (79), Healy for J McGrath (54), Cronin for Strauss (13), Moore for Ross (54), Ruddock for Cullen (55), Ryan for O'Brien (56).
Edinburgh: Bezuidenhout, Beard, Scott, Strauss, T Visser, Leonard, Laidlaw, Dickinson, Ford, Nel, Gilchrist, B. Toolis, Coman, Leonardi, Denton.
Replacements: Francis for Bezuidenhout (71),
Hart for Beard (3), Atiga for Scott (29),
A Toolis for B Toolis (59), Basilaia for Denton (27).
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article