Castleford came from behind to secure a dramatic 26-21 victory at Huddersfield on Thursday.
The Tigers trailed 18-12 at half-time, with Australian full-back Jake Mamo bagging a hat-trick for the home side, but the Super League leaders fought back after the break to seal the win.
Joel Monaghan opened the scoring for the visitors after seven minutes, but Mamo soon made his mark on the first half.
He finished Aaron Murphy’s pass out of a two-man tackle to score his first try, was put through a gap by Danny Brough for his second and then followed up a grubber kick from the Giants’ captain to complete his hat-trick.
Greg Minikin grabbed his 13th try of the season after Mamo’s second score, but Huddersfield deservedly led at the break.
Greg Eden drew Castleford level early in the second half, but a Brough penalty and drop-goal restored Giants’ lead after Paul McShane’s penalty for Tigers.
Both sides played out much of the final 10 minutes with 12 men, with Castleford’s Jake Webster shown a yellow card for a professional foul, before Brough was also sent to the sin-bin for a tackle below the knees.
Jesse Sene-Lefao’s late try won it for the Tigers to move them three points clear of Hull FC at the top of the table.