Warrington overcame a half time deficit to defeat Castleford and move to within one point of the Super League leaders.
Castleford led at the break thanks to four converted tries from Justin Carney, Weller Hauraki, Adam Milner and Kirk Dixon with Warrington replying through Lee Briers and Garreth Carvell.
But Warrington came firing back scoring five second half tries to one.
Brad Dwyer, Richie Myler, Joel Monaghan and Micky Higham (2) all crossed with Craig Huby scoring for Tigers.
Stefan Ratchford chipped in with six goals in a win that kept Warrington a point behind leaders Huddersfield with four league games left.
The Wolves went ahead against the run of play from their first meaningful attack when Briers caught the home defence flat-footed by darting over from close range for a try that Ratchford converted.
The Tigers levelled with a superbly-worked try when slick handling by Hauraki, Grant Millington and Jamie Ellis put in Carney at the corner.
Castleford then took the lead when Ratchford collected Ellis's high kick but lost the ball as he was tackled and Hauraki scooped it up to score.
Ryan Boyle's magnificent off-load then created the opening for Jordan Tansey to send in Milner before the Wolves fell further behind when Rangi Chase fooled their defence to set up a touchdown for Dixon.
Dixon added his fourth conversion to put the Tigers 24-6 up.
Warrington saw little of the ball in the first half but they got themselves back into the game when substitute Carvell scored from close range and Ratchford converted to cut the gap to 12 points.
Tony Smith's side looked far more determined in the second period and soon levelled the scores. Substitute Dwyer plunged over from close in before Briers made the opening for half-back partner Myler to cross.
Warrington then regained their lead with their third try in six minutes when Higham shot over from acting half and Ratchford added his fifth goal to put them 30-24 ahead.
Castleford squared matters again in the 65th minute when Huby capitalised on Daryl Clark's grubber kick to grab a try, Dixon again kicking the extras.
But Wolves struck a vital blow three minutes later when Myler put in Higham for his second try and they sealed victory when Monaghan went in at the corner.
VIEW FROM THE TRAINING ROOM
Castleford coach Daryl Powell:
"I thought our boys worked exceptionally hard and for large parts we were the better team," he said.
"The game flipped a little bit at half-time for a number of reasons and it took us a while to get back into it in the second half.
"We got back into it at to level at 30-30 but next set we gave a 50/50 pass that went wrong and those are the little 50/50s we are getting wrong at the moment and that is what is hurting us.
"Having said that I thought we conceded some soft tries on our own try line in the middle of the field and that was probably the defining factor."
Warrington coach Tony Smith:
"Hang on to the ball and you'll score tries was what I told the players at half-time. Whichever side hung onto it scored.
"The weight of possession against us in the first half was just enormous. Castleford are a terrific attacking side and we didn't have our fair share of ball in the first half. I was quite pleased we were within 12 points of them at half-time.
"We were a bit flat early in the week for a few days in training after our Challenge Cup defeat. Today was about character for us and I thought we showed bucket loads of it."
Castleford: Tansey, Dixon, Shenton, Channing, Carney, Chase, Ellis, Boyle, Milner, Huby, Millington, Hauraki, Massey.
Replacements: Fleming for Boyle (49), Mason for Huby (26), Martin for Millington (52), Clark for Massey (26).
Warrington: Ratchford, C. Riley, Grix, C. Bridge, J. Monaghan, Briers, Myler, Wood, Higham, Hill, Waterhouse, Westwood, Harrison.
Replacements: Morley for Wood (23), Dwyer for Higham (27), Carvell for Waterhouse (28), Laithwaite for Harrison (23).
Ref: Robert Hicks (Oldham).