Huddersfield will fly the flag for Yorkshire in the semi-finals of the Carnegie Challenge Cup after grinding out a hard-fought victory in a tense quarter-final tie against Castleford.
The Giants demonstrated exceptional patience to secure a breathtaking win in a match low on quality but high on drama, scoring two tries in the last 11 minutes after frittering away a host of earlier chances.
The Tigers showed remarkable tenacity to stay in the game and were in sight of their first win at the Galpharm Stadium for five years when they led 14-6 after 69 minutes.
But Huddersfield finished the stronger side and their second-half pressure told when man of the match Stephen Wild and ex-Featherstone player Danny Kirmond grabbed the all-important scores.
The Giants ran in eight tries against Castleford's neighbour Wakefield a week earlier but could manage just three on Sunday despite creating eight clear chances.
The Tigers carved out just three opportunities but finished off two of them through Michael Shenton and Brett Ferres to put them in sight of their first semi-final for seven years.
The visitors started brightly when the clever distribution of acting captain Ryan McGoldrick, allied to the kicking of Rangi Chase, helped them offset the loss of scrum half Brett Sherwin.
It was from a towering kick from Chase that Castleford took a fifth-minute lead, centre Shenton outjumping Martin Aspinwall to touch down for his 300th point for the club.
The introduction of front-row forward Eorl Crabtree midway through the first half injected fresh impetus into Huddersfield's attacking game and they dominated the second quarter.
Stand-off Kevin Brown drew the Giants level after 22 minutes when he twisted and turned out of the two-man tackle of Craig Huby and Brett Ferres to score his side's first try and Brett Hodgson's conversion edged them in front.
They missed a glorious chance to stretch their lead when centre Paul Whatuira broke clear from his own half to send winger David Hodgson away but, with Richard Owen bearing down on him, he chose to pass instead of going for the line and the supporting Luke Robinson put it to ground.
Huddersfield lost centre Jamahl Lolesi with a head injury after 17 minutes but Wild proved a superb replacement after switching from the pack and was heavily involved as the Giants piled on the pressure.
The former Wigan forward was inches away from touching down David Faiumu's grubber kick and then his pass to Aspinwall went to ground with the line beckoning.
The missed chances began to eat away at Huddersfield's confidence and Castleford drew level on the stroke of half-time through a Kirk Dixon penalty.
Huddersfield fluffed another clear-cut opportunity early in the second half when Brown and Scott Moore engineered an overlap but Whatuira's final pass to Hodgson was forward.
The misses began to look costly when, from their first attack of the second half, substitute prop Chris Feather offloaded from the tackle to get Ferres over for the visitors' second try.
Dixon added the goal and kicked a second penalty after 49 minutes to put his side two scores in front at 14-6.
As the Giants pressed, Aspinwall was held up over the line the Tigers defenders somehow managed to stop Whatuira short.
Castleford had a chance to make sure when Chase broke the first line of defence and got Kirk Netherton over only for video referee Phil Bentham to rule the tackle by Brett Hodgson had been made and he disallowed the try.
It proved a crucial call as the Giants found another gear. Robinson offloaded from a two-man tackle to get the impressive Wild striding over and just four minutes remained when Kirmond took Brown's pass to go through a gap for the winner.