The Toronto Wolfpack recorded the biggest win of their young career Friday, edging the storied Leeds Rhinos 17-16 to move a step closer to Super League promotion.

Wolfpack fullback Gareth O'Brien, no stranger to match-winning kicks, booted a long-range drop goal with five minutes remaining in the final round of the Super 8s Qualifiers.

Toronto (5-2-0) can finish no lower than fourth in the playoff table, which would mean hosting the so-called Million Pound Game on Oct. 7 with the winner earning promotion.

The Wolfpack can also finish third and secure automatic promotion if Hull Kingston Rovers (4-2-0) don't beat Widnes (1-5-0) by at least 14 points Sunday.

Watch highlights of the Wolfpack's crucial win.

Toronto beats Leeds 17-16, assured of at least a play-in game. 2:29

If Hull KR do win by enough, Toronto will host London Broncos in the Million Pound Game.

"We'll sit and watch Sunday's game. We'll relax, watch that and who knows, we might book a flight or go to the nearest pub," Toronto coach Paul Rowley told Sky TV after the game. "We'll see what happens at the end of Sunday. But I'm proud of the boys. They deserved that today."

'We dug in for each other'

The Super 8s Qualifiers group the bottom four teams in the elite Super League (Leeds, Hull KR, Salford and Widnes) with the top four in the second-tier Betfred Championship (Toronto, London, Toulouse Olympique and Halifax RLFC).

The top three in the standings secure automatic places in the Super League while No. 4 faces No. 5 in the Million Pound Game to see who joins them.

Trailing 16-12, Toronto pulled even in the 64th minute when, after captain Josh McCrone changed the direction of the attack, winger Matty Russell touched down a well-placed Bob Beswick grubber kick to the corner. But O'Brien missed the kick, leaving the score tied at 16-16.

Leeds were reduced to 12 men in the 68th minute when Dom Crosby was sin-binned for a dangerous tackle.

One. Step. Closer. <a href="https://twitter.com/TOwolfpack?ref_src=twsrc%5Etfw">@TOwolfpack</a> defeat <a href="https://twitter.com/leedsrhinos?ref_src=twsrc%5Etfw">@leedsrhinos</a> 17-16 in their final Super 8s qualifier, and find themselves within inches of automatic promotion to the Rugby Super League<a href="https://t.co/FNLnCPdIKs">https://t.co/FNLnCPdIKs</a> <a href="https://t.co/BD81ESBiZX">pic.twitter.com/BD81ESBiZX</a> —@cbcsports

Both teams then narrowly missed a drop goal — McCrone in the 73rd minute and Richie Myler for Leeds in the 74th.

But O'Brien made no mistake. He was also on target in 2016 when his drop goal for Salford in sudden-death extra time relegated Hull Kingston Rovers and kept the Red Devils in the top-flight. His drop goal also proved to be the difference in Toronto's 13-12 win over Toulouse on Sept. 15.

"We dug in for each other, we knew it was going to be tough," O'Brien told Sky. "Leeds are a champion side."

"We've done our bit now," he added. "We can't control what other teams do, but we'll see what happens."

2nd straight win over Super League opponent

It marked Toronto's second straight win over Super League opposition, following a 20-12 home victory over Widnes.

Cory Paterson and Nick Rawsthorne also scored tries for Toronto at Emerald Headingley Stadium. O'Brien kicked a conversion and a penalty.

Tom Briscoe, Liam Sutcliffe and Jimmy Keinhorst scored tries for Leeds, which trailed 12-10 at the half. Sutcliffe added two conversions.

Leeds won the 2017 Grand Final but finished ninth this season in the Super League with an 8-13-2 mark. Coach Brian McDermott paid the price, fired in early July after seven straight super League losses.

"I thought we were poor," said Kevin Sinfield, Leeds' director of rugby. "And I have to say, I didn't think Toronto was much better. I didn't think it was a great game."

"We just weren't good enough tonight, especially at home ... Credit to Toronto," he added.

Both teams made mistakes in a sloppy, penalty-filled opening 15 minutes.

Paterson opened the scoring in the 13th minute after O'Brien broke through a Keinhorst tackle with Toronto leading 6-0 after the conversion. The Rhinos responded in the 19th minute, cutting the margin to 6-4 with Briscoe touching down a Sutcliffe grubber kick after a somewhat chaotic end to an offensive set.

Toronto increased the lead to 8-4 in the 23rd minute when O'Brien slotted over a penalty after a Leeds dangerous tackle.

The home side pulled ahead in the 27th minute when Sutcliffe plucked the ball out of Paterson's hands as the big Aussie went up to pull down a Myler high kick near the posts. Sutcliffe's conversion made it 10-8 for Leeds.

Rawsthorne, a Leeds academy product starting for suspended centre Chase Stanley, dove over in the corner on the stroke of halftime after Toronto kept the attack alive with a series of off-loads.

Wallace returned

Toronto halfback Blake Wallace was injured late in the first half but stayed on, trying to run off the injury. He returned for the second half with his right ankle bandaged.

Despite the injury, Wallace was awarded a try in the 50th minute after he touched down an Andy Ackers kick. But video review showed the ball had been grounded first by a Leeds player.

Keinhorst put the Rhinos back in the lead in the 55th minute, breaking through several tacklers from in close to touch the ball down. Sutcliffe's conversion hit the post, but went over for a 16-12 Leeds advantage.

Paterson limped off for Toronto soon after with what appeared to be a calf issue.

London (3-2-0) hosts Halifax (0-6-0) on Saturday before the decisive Hull KR-Widnes match.

Toronto, promoted out of the third-tier League 1 in its inaugural 2017 season, topped the Championship with a 20-2-1 record this season.