Leinster were forced to endure an 18-9 away defeat to the Dragons just a week before the Heineken Cup Final in Edinburgh.
Victory was something of a crumb of consolation for the Dragons, whose bid for automatic qualification to Europe's biggest tournament ended when the Scarlets beat Cardiff Blues in midweek.
They also denied an Irish region without three of their four British and Irish Lions a losing bonus point in a poor match.
Leinster had the most to gain even though they were not going to catch newly-crowned league champions Munster.
Victory would secure them second place in the final table but there was also the small matter of a run-out for some squad players ahead of next weekend's European final against Leicester.
And it also marked the return of Lions-selected wing Rob Kearney, who had been out for five weeks with the mumps.
For the Dragons, who signed former Wasps prop Ali McKenzie last week, it was about finishing off the regular season and getting ready for a Heineken Cup qualifying play-off in Italy on May 29.
Leinster took the lead through a Fergus McFadden penalty but they had their backs to the wall for 20 minutes of the opening half as first flanker Sean O'Brien was sent to the sin-bin for taking a player out illegally at a ruck.
Then the Dragons were awarded a penalty try when McFadden pulled home outside-half Jason Tovey back from a certain try by grabbing his shirt. That, of course, was another man in the bin.
Tovey, who is missing a dream tour of North America with Wales along with two of his Dragons colleagues because of the European Cup qualifier, converted.
And, where the Welshmen did not take advantage of O'Brien's ten minutes in the cooler, they did with McFadden's absence when full-back Martyn Thomas was put over in the corner by centre Phil Dollman.
McFadden reduced the arrears to 12-6 at half-time within five seconds of returning to the fray via a penalty from 37 metres.
The half was uninspiring, though, and it continued after the break where both teams were let down by too many handling errors.
Play was centred mostly between the 22 metre lines, with little imagination from either team to break the monotony.
McFadden clawed three more points back with a 42-metre penalty just after the hour to make it 12-9 before both coaches made their personnel changes, including the replacement of Kearney who had a solid performance.
Replacement James Arlidge, on for injured Tovey, put over a mid-range penalty with three minutes to go and gave the Dragons a six-point cushion.
Leinster were almost instantly awarded kickable penalties but their decision to opt for tries to win the game backfired.
And, when Leinster infringed again 30 metres from their own posts, Arlidge made them pay to seal the game for the Welsh side.
Leinster will have their star men, like Brian O'Driscoll, back next Saturday at Murrayfield but, for now, they will have to wait and see if Edinburgh win at Cardiff Blues tomorrow to find out where they finish in the domestic league.
Tries: Penalty, Thomas
Pen: Alridge 2
Pen: McFadden 3
Dragons: 15 Martyn Thomas, 14 Gareth Wyatt, 13 Rhodri Gomer Davies, 12 Phil Dollman, 11 Richard Fussell, 10 Jason Tovey, 9 Wayne Evans, 8 Craig Hill, 7 Lewis Evans, 6 Dan Lydiate, 5 Luke Charteris, 4 Andrew Hall, 3 Rhys Thomas, 2 Tom Willis (capt), 1 Adam Black.
Replacements: 16 Steve Jones, 17 Nigel Hall, 18 Huw Gustafson, 19 Grant Webb, 20 Aled Brew, 21 James Arlidge, 22 Alex Walker.
Leinster: 15 Girvan Dempsey, 14 Simon Keogh, 13 Fergus McFadden, 12 Kyle Tonetti, 11 Rob Kearney, 10 Ian McKinley, 9 Chris Keane, 8 Stephen Keogh (c), 7 Sean O'Brien, 6 Kevin McLaughlin, 5 Devin Toner, 4 Trevor Hogan, 3 Stephen Knoop, 2 John Fogarty, 1 Ronan McCormack.
Replacements: 16 Brian Blaney, 17 Jamie Hagan, 18 Cameron Jowitt, 19 Paul Ryan, 20 Paul O'Donohoe, 21 Ian Madigan, 22 David Kearney.
Referee: Graham Knox (SRU).
Assistant Referees: Hugh Watkins (WRU), David Jones (WRU).
TMO: Gareth Simmonds (WRU)