Jared Payne's second-half try effectively sealed a crucial win for Ulster in the race for the Guinness PRO12 play-offs as Leinster were made to rue their indiscipline at the Kingspan Stadium.
Ulster's place in the top four will be confirmed if Scarlets lose at Judgement Day later on Saturday, while Leinster's slip-up mean second-place Connacht remain in pole position for a home semi-final.
Leinster made things difficult for themselves in both halves - Rob Kearney's block on Ruan Pienaar saw Ulster awarded a penalty try before the break, and Payne's 57th-minute try came while Luke Fitzgerald was in the sin bin.
There was no way back from Leinster from there and Paddy Jackson, who collected 11 points from the tee, then added the gloss with a breakaway try at the death.
Ulster, whose only loss in their last four PRO12 games had to be an in-form Glasgow Warriors, had to weather an early Leinster storm.
Pressure from Isa Nacewa and Kearney forced Jared Payne to punt the ball into touch but Ulster's maul defence stood firm, and Leinster were eventually penalised for holding on.
A dash from Andrew Trimble opened up Leinster for the first time with ten minutes gone, and after Luke McGrath was pinged for obstructing the Ireland wing, Jackson split the posts to put Ulster three ahead.
A couple of promising moves for both sides broke down - before Pienaar's moment of magic opened things up.
The South African scrum-half, having sniped through following a sumptuous dummy, was blocked off by Kearney while chipping through. The penalty try was awarded, the conversion kicked by Jackson, and to compound Leinster's woes Kearney was sent to the sin bin.
Ulster couldn't take advantage of that ten minutes however as Leinster kept a lot of ball and even earned a breakdown penalty, which Sexton slotted over.
And the boys in blue ended the half on top in much part down to the lively Sexton, who cut the deficit down to four points after Josh van der Flier was caught with a high tackle.
But the home side's stout defending was also catching the eye, wings Trimble and Rory Scholes in particular delivering some crunching hits.
The hosts raced out of the blocks after the break and Leinster were forced to concede a five-metre scrum after Jackson tackled Luke McGrath over the try-line.
Fine work from the scrum and a powerful Ben T'eo break made sure that Leinster cleared their lines however - though the visitors were to let ill-discipline get the better of them again.
With 55 minutes gone, replacement Fitzgerald was shown a yellow after he pulled back Scholes as the Ulster wing attempted to reel in Stuart McCloskey's offload.
The ensuing penalty saw Jackson extend Ulster's lead out to seven points again, and the Ireland fly-half made an even bigger difference moments later.
With Ulster on the attack, Jackson pulled in two defenders and set Luke Marshall away, who could not miss the wide open Payne.
Jackson's conversion made it 20-6 with only the final quarter left to play and though Leinster looked dangerous when restored to their full complement, another Jackson penalty was to follow.
And Ulster's No.10 had the last word when he broke from deep in his own half and had enough pace to finish.
Scholes, on his last appearance at the Kingspan before his summer move to Edinburgh, nearly capped off the win with a bonus-try but he couldn't hold onto the final ball.
To buy tickets for the Guinness PRO12 Grand Final clickhere. Also follow us onFacebook, join the conversation onTwitter, sign up to ourYouTube channel for extensive match highlights and sign up for ournewsletterfor regular updates on the Guinness PRO12.
Ulster's Stuart McCloskey fights for metres in the first half