Chris Hicks kicked the winning goal after the hooter had sounded to secure a vital away victory for Warrington against Hull FC.
James Lowes' men bounced back from last week's drubbing in France with the two points thanks to Hicks, who converted an 80th minute Matt King try.
Hull held the advantage at the break thanks to a brace of converted tries from Shaun Berrigan, with Warrington winger Kevin Penny marking his return from injury with a try sandwiched in between.
The lead changed hands on a number of occasions in the second half. First, Lee Briers crossed the line to tie things up at 12-12, before Hull youngster Jodie Broughton edged his side in to a 16-12 lead.
Penny added his second try to give the visitors the advantage once again, before Kirk Yeaman's try with just five minutes on the clock looked to be just enough to see the home side home.
But then after King crossed five metres in from the touchline in the dying seconds, Hicks stepped up to snatch the two points and keep the Wolves on the cusp of the play-off places.
Lowes, who has now recorded 3 wins from 4 games in charge, said: "I'm really pleased with our second half performance. I thought we were poor in the first half and turned too much ball over.
"But our defence was good and we did a lot of it, but it held up and helped us when we had more ball control in the second half. I know that it's an 80-minute game.
"This was a massive win, from last week and in its own right, coming here to Hull and getting the result."
Opposite number Richard Agar was disappointed: "I thought ultimately we got what we deserved on our second-half showing.
"We should have got a bigger half-time lead, but we invited them back into it. We failed to accumulate any completions in the second half and even when we got to one minute and 45 seconds on the clock to win it we came up with another incompletion. Seven from 14 tells its own story.
"That's been par for the course this season. Off the top of my head we've had three defeats and a draw that have gone to the last two minutes of the game.
"We showed in the first half that we have plenty of promise, but our inability to go on and carry that through has come back to haunt us."