Danny Brough missed a late conversion as Warrington Wolves survived an almighty scare to beat Wakefield Trinity 34-32 and move level on points with Betfred Super League leaders St Helens.
Having advanced into a 34-12 lead with 30 minutes remaining, the Wolves were then forced to hang on as Wakefield scored four tries, the last of which Brough failed to convert to steal a point.
Warrington took control with tries from Toby King, Josh Charnley and Chris Hill, all converted by Stefan Ratchford, in the opening 12 minutes.
After a Jake Mamo try was disallowed for the visitors, Wakefield responded when Ryan Hampshire's effort was converted by Brough.
But Warrington extended their advantage through Blake Austin, who finished off a fine move on the half-hour, and two Ratchford penalties.
Wakefield fought back as David Fifita touched down in the 56th minute and, although Charnley grabbed his second from an Austin break shortly after, Kyle Wood went over twice in quick succession.
Max Jowitt and Joe Arundel scored in the final four minutes to make it 34-32, but Brough just failed to complete a remarkable comeback as his kick went wide.
Wakefield coach Chris Chester said: “To come up short like that is a tough one to take. It was a tale of two halves.
“They were far superior in the first half when everything seemed to happen too quick for us but that second half is what we’re all about and I couldn’t be more proud of them.
“The character and desire was there for all to see tonight. I know we lost the game but, with that kind of effort and commitment, we will win more than we lose. I’m proud and pleased we found a way to get back in it. It felt like a bit of a win."
Warrington coach Steve Price said: “We got a win and that’s the most pleasing thing out of tonight. I thought our first 40 minutes was outstanding. We were really polished in attack and defensively we were sound.
“The last 22 minutes were like an avalanche, it was coming and we couldn’t control it. They are a good footy team and they moved the ball around.
“There are a few things we need to dust up on but it’s credit to our playing group to hang in and come away with a win."