Wakefield held on for a crucial two points in the hunt for a top six spot for a 28-26 win over Huddersfield.
The Wildcats looked assured of victory when they held a 24-8 lead on 50 minutes, and despite a score from Eorl Crabtree, Jason Demetriou's try extended the home side's advantage to 28-14.
However, tries from John Skandalis and Darrell Griffin set up a thrilling finale that saw the Giants just fall short of a win in their first game since the departure of Head Coach Jon Sharp.
An early penalty from Jamie Rooney put Wakefield 2-0 up but Jamahl Lolesi gave Huddersfield the advantage after a tight opening quarter with a converted try on 18 minutes.
Chris Thorman added a penalty to extend that lead to 8-2 before a Jamie Rooney score reduced the deficit to 8-6. But two tries on the stroke of half time turned the game on its head.
Rooney converted a Scott Grix try two minutes before the break and then scored one of his own, converted by Danny Brough, to give the home side an 18-8 interval lead.
Kevin Henderson, and then Jason Demetriou, looked to have given Huddersfield too much to do, and it proved just enough for the Wildcats after the frantic finale.
Wakefield - 28T: Rooney (24, 40); Grix (38); Henderson (48); Demetriou (55)
G: Rooney (7, 39); Brough (40, 49)
Huddersfield - 26T: Lolesi (18); Crabtree (52); Skandalis (65); Griffin (70)
G: Thorman (19, 22, 53, 66, 71)
HT: 18-8
Ref: S Ganson
Att: 6,271