|Leinster (9) 24|
|Tries: Madigan, Conan Cons: Madigan Pens: Madigan 4|
|Ulster (6) 11|
|Tries: Herbst Pens: Pienaar 2|
Leinster moved back into the top four in the Pro12 as Ian Madigan's 19 points helped them see off Ulster at the RDS.
Two Ruan Pienaar penalties helped Ulster lead 6-3 in the first half as they looked more threatening in attack.
But Ulster indiscipline allowed Madigan to kick Leinster into a 9-6 lead by the interval as Dan Tuohy was sin-binned.
With Tuohy still absent, Madigan scored a cheeky try after his tap penalty and despite Wiehahn Herbst's reply, Jack Conan's late try sealed Leinster's win.
Leinster's win means the champions leapfrog Ulster into one of the play-off places in the Pro12 table and was their fifth straight win over their Irish provincial rivals.
After being outworked by Munster at Thomond Park last weekend, Leinster needed to produce a response and duly delivered.
Ulster looked the more dangerous side with ball in hand for the opening half hour but Leinster controlled the remainder of the contest as they clinically punished a number of Ulster errors.
However, the win may come at some cost for Leinster as prop Jack McGrath could be facing a citing for an apparent double stamp on his Ireland colleague Rory Best's ankle during a second-half ruck.
Ireland coach Joe Schmidt will also have been concerned by the sight of Jamie Heaslip being forced off early on by a shoulder injury although the number eight didn't appear in too much distress.
Ulster produced nearly all the early attacking enterprise as both Darren Cave and Tuohy threatened the Leinster line before Isaac Boss cleared the danger.
The visitors did take a deserved lead on 17 minutes as Pienaar slotted a penalty from just short of halfway after a similar effort had struck the crossbar moments earlier.
Luke Fitzgerald's dart into Ulster territory yielded Madigan's opening penalty and while Pienaar restored Ulster's lead on 26 minutes, two more penalties from the Leinster fly-half left the champions 9-6 ahead by the break.
Tuohy's sin-binning after illegally tackling Boss in a ruck led to Madigan's third penalty in injury-time.
With Tuohy absent, Leinster sensed their opportunity after the resumption and Zane Kirchner was held up just short of the Ulster line before Craig Gilroy's offside led to a penalty.
After turning down the certain three points, Madigan set up to kick for the corner but instead brushed past Roger Wilson and Callum Black to score as the Ulster defence was caught napping by his tap penalty.
Madigan's conversion increased Leinster's lead to 16-6 and while prop Herbst burrowed his way over for an Ulster try five minutes later, Pienaar failed to add the extras and later missed another penalty which would have kept the visitors in touch.
In contrast, Madigan's goal kicking remained impeccable as he extended Leinster's lead to 19-11 on 61 and the home side bossed territory late on as impressive man of the match Conan added a late try.
Leinster: Z Kirchner, F McFadden, L Fitzgerald, G D'Arcy, D Kearney, I Madigan, I Boss; J McGrath, R Strauss, M Ross, D Toner, M McCarthy, J Conan, J Murphy, J Heaslip (capt).
Replacements: J van der Flier for Heaslip 27 mins, S Cronin for Strauss 55, M Bent for McGrath 71, T Furlong for Ross 55, K Douglas for McCarthy 60, L McGrath for Boss 68, J Gopperth for Kirchner 65, B Te'o for Madigan 76.
Ulster: P Nelson; T Bowe, D Cave, S Olding, C Gilroy, P Jackson, R Pienaar; C Black, R Best (capt), W Herbst, D Tuohy, F van der Merwe, R Diack, C Ross, R Wilson.
Replacements: L Marshall for Bowe 48, R Herring for Best 74, A Warwick for Black 68, B Ross for Herbst 68, A O'Connor for van der Merwe, S Reidy for Ross 64, P Marshall for Pienaar 74
Not used: M McComish
Referee: M Mitrea (Italy)