Nathan Cleary was the hero with a brilliant hat-trick as minor premiership winners Penrith Panthers beat Sydney Roosters 29-28 to progress in the NRL finals.

A thrilling Qualifying final encounter on Friday saw Penrith reach the Preliminary finals after storming back from going 10 points behind in the early stages.

Cleary scored three tries as well as kicking four conversions and a drop goal, with Josh Mansour and Stephen Crichton also dotting down for the Panthers.

The Roosters, who will now have to face either Canberra Raiders or Cronulla Sharks in the semi-finals, made a fast start and came close to recovering in the latter stages but ultimately fell to a narrow defeat.

Early tries from Josh Morris and Freddy Lussick handed the defending champions the advantage but by the time the match reached the 50-minute mark, the Panthers had scored 28 unanswered points.

James Tedesco and Josh Morris crossed in reply for the Roosters, but Cleary's field goal ensured Penrith prevailed despite Angus Crichton's converted try setting up a tense finish.

Luke Keary tried to level matters with a desperate field goal attempt that fell short from 45 metres, allowing Cleary, the impressive Jarome Luai and the Panthers to celebrate as their fine 2020 season continued.