Huddersfield Giants overcame a half-time deficit to beat Leeds Rhinos by two points in a Super League thriller.
Tries by Kallum Watkins and Ben Jones-Bishop helped Leeds to a 12-6 advantage at the break, with Kyle Wood's score for the visitors sandwiched in between.
Jermaine McGillvary, Eorl Crabtree and Joe Wardle scores turned the game, before the home side hit back through Ryan Bailey and Liam Sutcliffe.
Tom Briscoe had a last-minute try for Leeds disallowed by the video referee.
Briscoe chased through to touch down from Joel Moon's kick after the final hooter had sounded, but his effort was chalked off for obstruction and Leeds missed the chance to return to the top of Super League.
The hosts were without full-back Zak Hardaker, who started his five-match suspension.
Watkins got the first points when he sidestepped the Giants defence to go over in the right corner, with Kevin Sinfield adding the extras.
But Huddersfield hit straight back as Chris Bailey's feed enabled Wood to score just to the right of the posts following a darting run, with Danny Brough's conversion levelling.
A dynamic burst through the middle by Leeds saw Moon tee up Jones-Bishop and Sinfield's kick gave his side a 12-6 lead at the break.
But the visitors made the running after the interval as a well-worked play was finished off by McGillvary in the right-hand corner and Brough's difficult conversion hauled the Giants level again.
Brough then helped give Giants a 12-point lead with two more kicks, after Crabtree pushed his way over under the posts and Wardle raced through moments later for three Huddersfield tries in nine minutes.
A fantastic off-load from Watkins enabled Bailey to sneak over - a try given after long consultation by the video referee - and then Sutcliffe raced into the right corner to give the hosts hope again.
Sinfield missed his third attempt at goal, but successfully landed his fourth as Leeds closed the deficit to two points.
Huddersfield's Jodie Broughton had a try disallowed for obstruction, before the dramatic disallowed Rhinos try.
Leeds coach Brian McDermott:
"Our performances have dropped right off, although we made some improvements there. Our attitude to hard work was a lot better than it has been for the last two weeks.
"We still had some defensive lapses, some moments where we switched off and that cost us the game.
"It was a great first 40 minutes. Both teams had a crack. We just didn't live with Huddersfield's intensity early in the second half and that's where the game was lost."
Huddersfield assistant coach Kieron Purtill:
"It's always good to come to Headingley and win. We probably didn't play smart at times.
"Both teams had chances to take the game away from each other but, from an outside point of view, it was a great spectacle and a great way to finish.
"When we did hold the ball we caused Leeds problems. We just didn't hold it for long enough. The pleasing thing is that there was effort there for 80 minutes."
Leeds: Jones-Bishop; T Briscoe, Watkins, Moon, Hall; Sutcliffe, Sinfield; Leuluai, R Ward, Peacock, S Ward, Delaney, Bailey.
Replacements: Kirke, Clarkson, Walters, L Briscoe.
Huddersfield: Grix; McGillvary, Murphy, Wardle, Broughton; Brough, Wood; Crabtree, Robinson, Johnson, Ferres, Lawrence, Bailey.
Replacements: Chan, Patrick, Faiumu, Ta'ai.
Referee: Richard Silverwood (RFL).