Teenager Liam Sutcliffe kicked an injury-time penalty to break Catalan Dragons hearts in a breathtaking finish to their First Utility Super League match at Headingley.
The Frenchmen were poised to make history with their first win at Leeds Rhinos when Morgan Escare's 77th-minute drop-goal put them 31-30 in front but a lack of composure brought their downfall.
The visitors gave away possession from the restart when the ball failed to go 10 metres and, after conceding another penalty right at the end for obstruction while in possession, 19-year-old Sutcliffe - deputising for injured captain Kevin Sinfield - maintained his composure to land the 30-metre goal which secured a 32-31 victory.
It was a fortuitous win for the Rhinos but a fitting way for Jamie Peacock to mark his 400th Super League appearance as he stood in as captain in the absence of Sinfield, who missed only his second match of the season with a back injury.
Catalan, who had lost on all nine previous visits to Headingley, were inspired by full-back Escare and Australian scrum-half Sam Williams, who created two tries and kicked five goals from six attempts on an impressive first start for the club.
The Dragons got off to the best possible start with pacy Escare taking Leon Pryce's pass 30 metres out to scythe through the Rhinos defence and step past Ben Jones-Bishop for his 17th try of the season.
Williams converted the try and, after Leeds had hit back when left winger Ryan Hall finished off a sweeping move in the corner to open his side's account, added a penalty to stretch the lead to 8-4.
The Rhinos were on level terms when full-back Jones-Bishop swooped on Williams' grubber kick and sprinted 85 metres for a glorious solo try but Sutcliffe again found the conversion attempt beyond him.
The home side almost took the lead when right winger Tom Briscoe collected Sutcliffe's high kick before losing the ball over the line and the visitors, clearly undaunted by their dismal record at Headingley, increased their advantage to 20-8 with two tries in nine minutes.
Williams was the architect each time, slipping the ball out of the tackle to get second rower Zeb Taia and hooker Eloi Pelissier over the line, and he maintained his 100 per cent record with the boot.
Peacock gave his side hope when his short pass got replacement forward Josh Walters over a try four minutes before the break and Sutcliffe's first goal cut the gap to six points.
When Taia brushed off three defenders to score his second try three minutes into the second half, the Catalans were firmly on course to end their hoodoo - but the Rhinos struck back with two tries in nine minutes to draw level.
Centre Joel Moon produced a decisive finish out wide before second rower Carl Ablett forced his way over from close range, planting the ball on the line despite the attention of three defenders.
Sutcliffe kicked his second goal to make it 24-24 and the pivotal moment appeared to come on 65 minutes when a superb break from Escare took his side deep into Leeds territority only for Pryce to send out a careless pass which was swooped on by Moon for his second try.
Sutcliffe's third goal opened up a six-point gap but McGuire failed with a drop-goal attempt and it was all square on 69 minutes when Pryce, making amends for his blunder, worked out a long pass for winger Daryl Millard to go in for the Dragons' fifth try.
Williams landed the touchline conversion to make it 30-30 and, after Williams tried to win it with a long-range drop-goal attempt which fell short, Escare thought he had won it with a successful strike two minutes later.