Mitch Achurch and Danny McGuire scored late tries as Leeds denied Catalan Dragons a first ever win at Headingley.
The Rhinos led 8-0 courtesy of a Ryan Hall try and two Kevin Sinfield goals.
But the Dragons responded well after the break and scores from Lopini Paea and Olivier Elima, both converted by Thomas Bosc, put them ahead.
But Achurch restored the advantage and McGuire crowned his comeback from a broken leg to guarantee a top-four spot for the reigning champions.
It rounded off a happy return for the scrum-half, who was back in action after three months out.
Ryan Bailey of Leeds and Catalans winger Damien Blanch were both sin-binned for their parts in a first-half altercation, before the Rhinos opened the scoring when Hall went over from dummy-half.
Sinfield extended the lead to eight points with the boot, but the French side hit back with two scores in quick succession after the interval.
Scott Dureau set up Paea to reduce the deficit, and fellow forward Elima barged over from close range to give the visitors a four-point lead.
Just as they sensed an historic victory, Leeds seized the initiative again as youngster Liam Sutcliffe sent prop Achurch through to score, before McGuire touched down Sinfield's kick to complete the win.
VIEWS FROM THE DRESSING ROOM
Leeds Rhinos head coach Brian McDermott:
"It was a tough game and we found a way to win. Catalans gave it a real go and you could see that but I thought we deserved to win.
"It was scrappy at times and I wouldn't pick out too many people for a mention, but it's hard to ignore the effort of Jamie Peacock.
"He has been tremendous this year. At this stage of the year people start banging the drum for Man of Steel and it would be hard to argue against him.
"It's big to have Danny [McGuire] back and the next task is to try and get him as match-fit as possible in such a short period of time."
Catalan Dragons head coach Laurent Frayssinous:
"We didn't execute again. There was some improvement today. We want to play into space and there will always be errors but we can still improve in our execution.
"Ian Henderson has got a twisted ankle and he will have to pass a fitness test next weekend.
"Julian Bousquet was strong tonight and it will be a big loss for us when we lose Remi Casty [to Australia's NRL] next year, so we will have to find some more leaders from within the group.
"I do believe we can do something in the play-offs. I believe we can perform against any team and tonight we showed that, but we need to learn that you can't just play for 72 minutes."
Leeds Rhinos: Hardaker; Jones-Bishop, Watkins, Moon, Hall; Sutcliffe, McGuire; Singleton, Sinfield, Peacock, Ablett, Clarkson, Bailey.
Replacements: Foster, Achurch, Kirke, Leuluai.
Sin Bin: Bailey (26).
Catalan Dragons: Webb; Blanch, Menzies, Duport, Bosc; Pryce, Dureau; Elima, Henderson, Bousquet, Casty, Whitehead, Mounis.
Replacements: Pelissier, Fakir, Paea, Garcia.
Sin Bin: Blanch (26).
Referee: Phil Bentham (Warrington)