Warrington survived a second-half fightback from Castleford to win 40-26 and cement second place in the Super League table.
The Tigers trailed 34-0 with less than half an hour to go, but they then managed to notch up 26 unanswered points to give themselves a chance of completing an astonishing comeback.
It was only a late Stefan Ratchford try that calmed Warrington nerves and sealed the win which gives them a three-point cushion ahead of third-placed St Helens.
Warrington were scintillating in attack in the first period, and they grabbed the lead inside the opening two minutes.
Tigers full-back Richard Owen dropped the ball inside his own half and the visitors took full advantage as Ben Westwood went over unchallenged and Brett Hodgson added the extras.
They doubled their lead soon after when Hodgson's cut-out ball was collected by Joel Monaghan, who strolled in for the simplest of finishes to put Tony Smith's side firmly in command.
And they didn't have to wait too long for their third score - Ryan Atkins getting on the end of Richie Myler's superb break after 22 minutes.
Westwood then grabbed his second of what was becoming a prolific afternoon for the visitors, and Hodgson nailed his fourth conversion to give the Wolves a commanding 24-0 lead.
And their first-half masterclass was not finished there as Chris Riley found time to produce a moment of individual magic to go over.
The second half continued in similar fashion to the first, and David Solomona marked his return to the Warrington side by crashing over to collect his first try of the season.
It looked as though it was a question of how many points the Wolves would rack up, but the Tigers had other ideas.
They finally got on the scoreboard when Nick Youngquest got on the end of a clever kick by Danny Orr.
And it got even better for Ian Millward's men, as they made it four tries in the space of 10 frantic minutes.
Rhys Williams scored a superb breakaway try before Rangi Chase created arguably the try of the afternoon, dancing his way around several Wolves defenders before providing an outrageous ball for Youngquest,to go in at the corner.
The home side reduced the gap to just 14 points when Owen went in under the sticks and Orr added the extras. And Lee Mitchell's converted try amazingly brought the Tigers within single figures, making it 34-26 with 12 minutes to play.
But Warrington held their nerve, and Ratchford's late breakaway effort sealed a crucial victory for Smith's men.