Castleford Tigers were left to rue missed opportunities as they lost another close game in going down 20-18 at Huddersfield Giants.
Daryl Powell's men were two points ahead with 11 minutes to play, but the third of a try hat-trick for Alex Mellor nudged the home team ahead and for all their late pressure the Tigers were unable to hit back.
Their frustration showed two minutes from time when Adam Milner was sin-binned and gave a crucial penalty away in an attacking position, allowing Huddersfield to ease pressure that had been building.
The first half was a tale of missed chances for both sides as it ended 8-6 to Cas, but both sides could have scored far more points as they had little difficulty opening up each other's defences at times.
The Tigers got off to a flying start as Greg Eden intercepted Kruise Leeming's pass and raced 60 metres for the opening try of the game in the second minutes.
Peter Mata'utia added a good conversion, but the Giants hit back off the back of two penalties as Mellor charged through a gap off a pass by Ukuma Ta'ai. The conversion by Darnell McIntosh made it 6-6.
The home side forced a goal-line drop-out when Calum Turner was driven back over his own line and from the next set Lee Gaskell appeared to have raced in for a try, but it was disallowed after obstruction the build-up by Suaia Matagi on Turner.
The decision was technically correct, but the obstruction did not really affect Gaskell so the Tigers could count themselves fortunate.
As Cas got back on attack Matt Cook went on a rampaging run and reached out for the line only to be inches short.
From the next set the Tigers were awarded a penalty and Mata'utia kicked it to nudge his side two points ahead.
There was a near thing at the other end when Jake Wardle knocked on trying to get to a grubber kick over the line.
It was the Tigers' turn to be unlucky two minutes later when Jake Trueman went on a strong run and lost the ball over the line as he tried to reach out in a tackle.
Mike McMeeken was the next player to drop the ball reaching out over the line and it seemed nobody could score at this stage.
That feeling was followed up with the last play of the half as Jermaine McGillvary looked to set to go over in the corner, but Trueman's last ditch tackle managed to just drag him into touch, the video referee confirming no score.
Huddersfield made a fast start to the second half to score within a minute, Mellor shooting through a gap for a try converted by McIntosh.
Cas hit back swiftly, however, as Trueman's grubber forced a goal-line drop-out then Cook powered over from close range after taking a tap penalty to himself.
With Mata'utia goaling the Tigers were back in front, but the lead was not held for long with McIntosh kicking a penalty for the Giants to make it 14-14.
Good defence saw Matagi held up over the line before Huddersfield nudged back ahead with another McIntosh penalty.
Successive saving tackles by McMeeken denied Joe Wardle and Akuila Uate on the Cas line as the Tigers showed they had stiffened up their loose defence of the first half.
When Cas forced some pressure they were awarded with successive penalties and Mata'utia slotted two kicks over to turn the game back round the visitors' way at 18-16.
But the Giants came up with the crucial play as Mellor back up McGillvary's break to score the winning try.
The hosts were correctly denied another score by the video referee after a ball steal in a two-man tackle on Turner, but it was all Cas in the closing stages.
Trueman and Mata'utia kicks earned goal-line drop-outs as they piled the pressure on. Daniel Smith was held up over the line as he tried to score on his debut then Milner was denied right on the line as he tried to burrow over.
He then lashed out when referee Ben Thaler did not spot that he was being held down after being tackled and gave away a penalty that ended the Tigers' hopes, being sent to the sin-bin as well.
Scorers - Huddersfield: Tries Mellor 3; goals McIntosh 4. Castleford: Tries Eden, Cook; goals Mata'utia 5.
Huddersfield Giants: McIntosh; McGillvary, Turner, J Wardle, Uate; Gaskell, Frawley; Ta'ai, Leeming, Matagi, J Wardle, Mellor, Murphy. Subs: O'Brien, Roberts, Ikahihifo, Hewitt.
Castleford Tigers: Turner; Clare, Minikin, Shenton, Eden; Mata'utia, Trueman; Watts, Milner, Millington, Sene-Lefao, McMeeken, Moors. Subs: Cook, Clark, O'Neill, Smith.
Referee: Ben Thaler.