An opportunistic try two minutes from time by Graham Appo decided a pulsating derby to lift Warrington above Widnes in the battle for a place in the Super League play-offs.
Widnes were looking for a winner of their own when Jules O'Neill re-gathered his kick and tried to get the ball away to players in support. Instead, it went to Appo, who sprinted away for the decisive points.
Even then, the drama was not over, with Shane Millard dropping O'Neill's pass on the Warrington try line in injury time.
"It was frustrating to see Shane knock on over the line,'' Neil Kelly, the Widnes coach, said. "But we shouldn't have been in a position where we were trying to scramble a try in the dying seconds.''
Warrington had started as though destined to make short work of their neighbours with Brent Grose breaking from deep and finding Rob Smyth in support for their first try after six minutes. More fragile defending allowed Nathan Wood through for their second five minutes later and their only disappointment was that Lee Briers missed a simple first conversion.
Widnes lifted their game and deserved something from an attack that ended with Dean Lawford held just short. Their frustration was compounded when, on their next attack, Lawford had his pass intercepted by Grose, who went 60 yards to score at his leisure.
Warrington were completely in control, but all that changed a few minutes before half-time. First the Widnes substitute, Phil Cantillon, marked his arrival by going over from dummy half. Then Appo put his kick-off out on the full and Widnes roared up field again, with O'Neill's perfect pass sending Deon Bird flying in.
Another raid initiated by O'Neill saw Warrington caught offside and his third goal cut the margin to two points immediately before the break.
Millard showed some fancy footwork to give Widnes the lead 10 minutes after the break, but Warrington regained it when Appo went over from close range for his first. O'Neill's fifth goal tied the scores, before the Warrington substitute Gary Hulse, backed up Brier's break to score with his second touch of the ball.
Lawford went over from Cantillon's pass to tie up the scores once more and then the drama really began.
Widnes: Spruce; Devlin, Bird, Hughes, Demetriou; Jules O'Neill, Lawford; Ralf, Millard, Farrell, Hay, McCurrie, Frame. Substitutes used: Campillon, Julian O'Neill, Mills, Finnigan.
Warrington: Appo; Gaskell, Grose, Sibbit, Smyth; Briers, N Wood; Fozzard, Clarke, Hilton, P Wood, Noone, Burns. Substitutes used: Hulse, Guisset, Gleeson, Stevens.
Referee: I Smith (Oldham)