Leinster finished top of the RaboDirect PRO12 table for the fourth time in seven years and will enter the play-offs as top seeds, where they will meet Ulster in the semi-final at the RDS next Saturday, but were made to sweat in an uninspiring 15-13 victory over eighth-placed Edinburgh.
Matt O’Connor’s side succeeded in winning their final home game of the regular season at the RDS, 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.
Two Greig Laidlaw first-half penalties gave the Scots a 6-5 lead at the interval, in-between young flanker Jordi Murphy's try, 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.
Importantly for both Leinster and Ireland, Sean O'Brien had a successful return from shoulder surgery with the fit-again back rower making his first appearance since December.
However, there was bad news for the province on the injury front when Richardt Strauss and Mike McCarthy were forced to come off during this game.
O'Connor said afterwards that neither were likely to feature against Ulster, McCarthy suffering from a "tight, potentially torn calf" and Strauss from "significant" strain of his hamstring.
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 and Murphy spun out of Dave Denton's challenge to plunge over from close range.
Gopperth missed the conversion and after Strauss unfortunately 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 number eight 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.
Rob Kearney was central to Leinster's fast-paced start when play resumed, Edinburgh clinging on despite Gopperth and full-back Kearney both going close.
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.
Unfortunately for Leinster, 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.
Edinburgh remained a live threat during the final 14 minutes, hunting for their first win in Dublin since 2005, even so off-colour Leinster held firm to secure home advantage in the semi-finals where they will face rivals Ulster.