Wakefield Trinity climbed into the top eight of Betfred Super League after snatching a dramatic 24-22 win over Salford Red Devils.
Sam Williams kicked two penalties to Gareth O'Brien's one to nudge Trinity ahead before Reece Lyne and Jacob Miller crossed the whitewash to extend their advantage to 12-2.
The Red Devils looked to have claimed the points after Ben Murdoch-Masila, Kris Welham, Greg Johnson, George Griffin all scored in a 12-minute purple patch to turn the game on its head early in the second half and lead 22-12 after O'Brien converted two of the four tries.
Wakefield rescued the game by scoring two tries in the last 11 minutes through Bill Tupou and Lyne's second, with Williams slotting a difficult conversion for his fourth kick of the match to edge his side back in front.
Salford missed a glorious chance to win it when second rower Ben Murdoch-Masila dropped the ball over the line in the last action of the match as Trinity held onto a game where both coaches renewed the call for video referees at all Super League matches.
"I thought it was a good advert for having video refs at every game because I thought (Greg Johnson) was in touch," Wakefield boss Chris Chester said.
"I thought we'd won it and thrown it away. It's a great win for us but we got out of jail. It shows the character and belief that we can come back and get a result when we looked like we were't going to get anything from the game.
"I'm happy for the fans because it's the first time we've won at home since we beat Warrington here last May. I'm pleased we've been able to send those people home happy."
Salford coach Ian Watson said: "At full speed it looks like he has dropped it but a Sky camera might tell you different because you've seen them given before.
It hurts and feel for the boys and the fans not to have won today. We have a good team and @BMMasila11 was awesome today— Marwan Koukash (@drmarwanK) March 12, 2017
"It's probably a case for having Sky cameras at every game but there's obviously a cost to the RFL. To be fair we should have drawn the winger and passed to Kris Welham who would have probably scored in the corner.
"It's a tough loss for us but it's a lesson we've got to learn. You can't question the players' desire, it was a bit of smartness that let us down, especially in the first half.
"They had a lot more sets than us and the two sin-binnings didn't help us. I thought in the second half when we started to play we'd get them but it cost us at the end, though a bit of our own downfall.
"It's hurt us today because this is a tough place to come. I thought we'd worked hard enough to get the win."