Ulster earned a deserved victory over Leinster at Ravenhill to maintain their 100% record in this season's Pro12.
A penalty try before the interval and a Nick Williams charge over early in the second half put Ulster in control.
Ian Madigan kicked four penalties for Leinster but Ulster clinched victory when Andrew Trimble got over following Ruan Pienaar's crossfield kick.
Fergus McFadden raced in on the left wing to get Leinster's only try near the end of the match.
It was only Ulster's second win in 19 meetings between the provincial rivals and it came despite having Rory Best in the sin bin for the last 10 minutes.
It was a positive response by Mark Anscombe's men, coming six days after their Heineken Cup defeat by Northampton.
They face another all-Ireland clash next on 29 December when they are away to Munster, while Leinster are at home to Connacht.
For Leinster, this was a third consecutive defeat in all competitions, and it will have done Joe Schmidt's men some damage in their bid to stay pushing for the league play-offs.
Ulster really should have been out of the blocks first but Paddy Jackson's fourth-minute penalty sailed left of the posts from what was a kickable effort.
Eight minutes later, though, Madigan made no mistake with his first kick after Tom Court was penalised at a scrum.
With Leinster increasingly getting on top it came as no surprise that Madigan made it 6-0 with a second penalty after 18 minutes when Nick Williams was penalised for not rolling away.
Ulster's cause was not helped when Jackson again miscued his second effort after 23 minutes.
He made no mistake three minutes later to get Ulster off the mark after Court won a penalty off Michael Bent.
The scores were then levelled just before the half hour mark when John Afoa won a scrum penalty and this time Ruan Pienaar landed the longer range effort.
Madigan then kicked his third penalty shortly afterwards but Ulster responded with Williams leading the way and then from a five-metre scrum referee George Clancy awarded a penalty try, which Pienaar converted to put Ulster 13-9 up at half-time.
But Leinster started the second half with Jamie Heaslip making a strong burst and with their opponents off-side in their own 22, Madigan struck his fourth penalty to close Ulster's lead to a single point.
The hosts responded as a Trimble half-break led to Darren Cave, Court and Pienaar all taking it on and Ulster got over the line with the television match official awarding the score to Williams and Pienaar converted.
With 10 minutes left, Best was sin-binned for not rolling away and even though Madigan was wide with the penalty, Ulster had to close out the game with 14 men.
And this they did with Pienaar's cross-kick working a treat for Trimble, who lost Andrew Goodman to score with Pienaar slotting the conversion to make it 27-12.
Leinster struck when McFadden got on the end of a Madigan pass in the 78th minute with the fly-half then kicking the conversion.
Ulster: Payne, Trimble, Cave, . Marshall, Gilroy, Jackson, Pienaar, Court, Best, Afoa, Henderson, McComb, Diack, Henry, Williams.
Replacements: D'Arcy for Cave (59), P Marshall for Jackson (66), Black for Court (79), O'Connor for Henderson (79), Herring for Diack (72), Wilson for Williams (69).
Not used: Macklin, Wallace.
Sin bin: Best (70).
Leinster: Reid, Conway, Macken, D'Arcy, McFadden, Madigan, Reddan, Healy, Cronin, Bent, Cullen, Toner, McLaughlin, O'Brien, J Heaslip.
Replacements: Goodman for Reid (54), Boss for Reddan (57), van der Merwe for Healy (54), Hagan for Bent (57), Denton for Cullen (54), Ruddock for McLaughlin (41).
Not used: Dundon, Byrne.
Ref: George Clancy (IRFU).