Huddersfield clinched the last place in the Challenge Cup semi-final draw after a nail-biting win over Castleford.
Michael Shenton's aerial take of a high kick set up Cas's opener before Kevin Brown scored for the Giants.
David Hodgson had a try ruled out after the break for a forward pass and Brett Ferres instantly punished the Giants, going up the other end to score.
Stephen Wild's try cut the Tigers' lead to two points before a late Danny Kirmond try sealed a thrilling win.
The first half was played in a full-blooded affair played in blistering heat.
Brown confident Giants can upset Saints
Castleford dominated the early stages but it only produced one score, which came when Shenton leapt in the left-hand corner to connect with Rangi Chase's kick and touch down.
But once Huddersfield changed their front row, the initiative swung their way and they were soon on the scoreboard.
Brown was the man who did the damage when he dummied a pass to create a hole in the Tigers' defensive line, then twisted and turned through several tacklers to touch down.
Castleford can count themselves lucky not to have fallen further behind a minute later.
David Hodgson sprinted clear into the Tigers' half on a three-on-one breakaway attack, but he panicked under pressure, and the move broke down after his poor off-load to Luke Robinson.
Kirk Dixon's penalty just before the break pulled Castleford level but it looked like the home side had regained the initiative just after the restart, when Dave Hodgson went over in the left-hand corner.
But crucially it was adjudged that the final pass of the move was forward, and the score was ruled out.
Within a minute, Huddersfield were made to pay for that mistake as Chris Feather offloaded to Ferres to touch down, and two more Dixon goals gave the visitors an eight-point lead.
Cup defeat 'devastating' - Matterson
Huddersfield responded by pummelling the Giants line, but for all their pressure they could not score, with Brown wasting a great chance when he knocked on with the line at his mercy.
As the Giants piled on the pressure, Brett Hodgson's superbly-timed tackle on Chase denied the Tigers another breakaway try, and Huddersfield managed to close the gap to two points when Robinson's clever reverse pass put in Wild to score.
Having see so many Huddersfield chances wasted, Cas could have been forgiven for thinking it was their day,
But in the dying stages the pressure paid off as Kirmond went over for what proved the match-winning try.
Huddersfield assistant coach Paul Anderson
"We didn't play that well but the real pleasing thing was the resolve and never-say-die attitude to grind the win out and get us over the line.
"I am sure Cas will be kicking themselves because they were in a position to win the game but you've but got to play for the full 80 minutes and hope the players show the grit and determination to pull you through."
Castleford coach Terry Matterson:
"It's hard to take, the guys are still sitting there wondering why they are in the losers' dressing room.
"We've got to learn from this. We need to learn how to close a game out. The game goes for 80 minutes and we're not coming up with the right stuff for 80 minutes.
"Effort-wise we were outstanding. I couldn't be more proud of them because we stopped everything they threw at us.
"The way we handled that last 10 minutes was as if we were chasing the game."
Huddersfield: B Hodgson, Aspinwall, Lolesi, Whaturia, D. Hodgson, Brown, Robinson, Mason, Moore, P. Jackson, Kirmond, Wild, Finnigan. Replacements: Faiumu, Crabtree, D. Griffin, Raleigh.
Bookmark with:
What are these?