A try two minutes from time from winger Tom Lineham gave Warrington a dramatic 22-20 Betfred Super League victory over Wakefield to stretch their unbeaten run to five matches.
Warrington tries: Atkins (22), Hill (55), Brown (69), Lineham (78)
Conversions/Penalties: Patton (22, 55, 69)
Wakefield tries: Gibson (8), Caton-Brown (10), Johnstone (46)
Conversions/Penalties: Finn (8, 10, 37, 46)
A try two minutes from time from winger Tom Lineham gave Warrington a dramatic 22-20 Betfred Super League victory over Wakefield to stretch their unbeaten run to five matches.
The Wolves looked to be heading to defeat but staged a spectacular second half comeback to claim an important win at the Halliwell Jones Stadium and close the gap on seventh-placed Trinity to just one point in the race for the top eight.
Wakefield looked to be on their way to a comfortable victory as they led 20-6 early in the second half.
However, the visitors succumbed to a late Wolves rally as tries by Chris Hill and Kevin Brown set up a frantic finish that saw Lineham's spectacular dive in the corner win it for the Wolves in the dying stages.
Ryan Atkins claimed Warrington's other try, with Declan Patton landing three goals.
Ashley Gibson, Mason Caton-Brown and Tom Johnstone claimed tries for Wakefield, with Liam Finn landing four goals.
The Wolves were without suspended duo Ben Westwood and Daryl Clark and Mike Cooper also missed out after picking up a knock against Huddersfield on Easter Monday. However, they welcomed back Atkins, Joe Westerman and Brown into the squad.
Max Jowitt came in at full-back for Trinity in place of Simon Grix and James Batchelor was on the bench as Mitch Allgood and Matty Ashurst were missing from the side that narrowly lost to Wigan on Monday.
The visitors made a dream start, hitting their hosts with two tries in two minutes to take an early 12-0 lead within the first nine minutes.
They opened the scoring on seven minutes when Finn saw his kick on the last tackle deflected perfectly into the path of Kyle Wood, who then kicked ahead for Gibson to touch down.
And in the their very next set Jacob Miller broke from deep and the supporting Caton-Brown was on hand to take the stand-off's pass to score under the posts. Finn converted his second try.
The Wolves recovered from their shaky start and applied plenty of pressure but could not find a way through a gritty Wakefield defence - and when they did Atkins saw his effort from a kick ruled out by the video referee for offside.
But the home side finally registered their first points midway through the first half when Patton and Stefan Ratchford combined to send Atkins clear from deep and the centre raced 80 metres - bumping off Wakefield full-back Jowitt in the process - for a spectacular long range try which Patton converted to make it 12-6.
Tom Johnstone had a try ruled out by the video referee for a knock on before Finn landed a penalty late in the half to give Wakefield an eight-point advantage at the break.
The visitors made the perfect start to the second half when Millar's excellent floated pass gave Johnstone the space to score six minutes after the restart. Finn converted to make it 20-6.
Wolves skipper Chris Hill gave his side hope of a comeback when he powered his way through four attempted tackles to crash over and Patton's conversion cut the deficit to eight points again.
And with 11 minutes remaining Warrington set up a tense finale when Brown dummied his way over from close range to score - Patton again goaled to make it 20-18.
Then with less than two minutes remaining it was heartbreak for Wakefield as Ratchford's long pass gave Lineham space to race down the touchline and settle the contest.
Warrington coach Tony Smith on his side's battling display: "The character isn't in question at all.
"Some of our processes and methods we went about that game are questionable but the players are trying hard in all departments - and sometimes a little bit too hard.
"There were errors playing the ball and we were dropping the ball which are just little lapses in concentration and we need to be better because it's hurting us.
"We talked about controlling the ball at half-time and working our way back into the game so we never lost doubt about the result - but I would like to have been more in control a bit earlier in the match."
Wakefield coach Chris Chester admitted the defeat was tough to take: "It was one of those games that just got away from us.
"It's a tough one to take because I thought we were the best team for large parts of the game and we have just come up short again.
"I'm proud of the boys' efforts because we have come long way in a such a short space of time.
"To come to Warrington and be really disappointed with a loss just shows how far we have come. But it's been tough just talking to the boys after the game because they are gutted."