Leinster (9) 21
Pens: Contepomi (7)
Blues (11) 20
Try: A Powell Pens: Halfpenny (4) Drop: N Robinson
Bradley Davies of Cardiff Blues claims the ball ahead of Leinster's Leo Cullen
An injury-time penalty by Felipe Contepomi saw Leinster shade victory over the Blues at the RDS.
The Argentine struck seven penalties from seven attempts which clinched it for the Magners League champions.
Four Leigh Halfpenny penalties and an Andy Powell try had Cardiff ahead 17-12 as the game entered the final quarter.
But Contepomi landed three penalties in the closing stages, the last of which came after the Blues had regained the lead with a Nicky Robinson drop goal.
These sides fought out a 16-16 draw at the Arms Park in September and a close game was always on the cards.
Early penalties from Leinster centre Contepomi gave the hosts a 6-3 lead, with Halfpenny keeping the Blues in touch.
Cardiff placed huge pressure on the Leinster pack and after Halfpenny's second penalty, it was no surprise when the visiting forwards helped propel Powell over for an unconverted 30th-minute try.
Leinster hogged possession in the closing 10 minutes of the first half, getting a third penalty through Contepomi.
Contepomi edged Leinster 12-11 ahead in the second half but Wales starlet Halfpenny was showing little sign of nerves at the other end, picking off penalties in the 56th and 66th minutes.
However, the introduction of former South Africa international Ollie Le Roux really spurred on the home side and their large vocal support really made their presence felt.
With try-scoring opportunities limited, Leinster forced a flurry of late penalties which the classy Contepomi converted.
Two in quick succession had Leinster 18-17 ahead and, although Robinson helped himself to an opportunist drop goal, Contepomi had the final say as Leinster closed the gap on league leaders Munster to two points.
Leinster: Kearney, Horgan, O'Driscoll, Contepomi, D'Arcy, Nacewa, Whitaker, Wright, Blaney, van der Linde, Cullen, Toner, Elsom, O'Brien, Heaslip.
Replacements: Fitzgerald for Nacewa (50), le Roux for Blaney (67), Healy for van der Linde (34), O'Kelly for Toner (51).
Blues: Halfpenny, James, J. Robinson, Shanklin, G. Thomas, N. Robinson, Spice, Yapp, T. Thomas, Filise, Davies, Tito, Molitika, Sowden-Taylor, A. Powell.
Replacements: Rees for Spice (64), Jenkins for Yapp (64), G. Williams for T. Thomas (60), Rush for A. Powell (60).
Referee: Peter Allan (SFU)