Former Salford winger Mason Caton-Brown scored a hat-trick against his old club as Wakefield Trinity ended the Red Devils' seven-match winning run with a dramatic 34-24 victory at the AJ Bell Stadium.
Salford tries: Bibby (38, 54), Kopczak (50), Tasi (72)
Goals: Dobson (39, 51, 55, 73)
Wakefield tries: Caton-Brown (5, 65, 76), Lyne (23, 33), Batchelor (79)
Goals: Finn (6, 34, 66, 78, 80)
Former Salford winger Mason Caton-Brown scored a hat-trick against his old club as Wakefield Trinity ended the Red Devils' seven-match winning run with a dramatic 34-24 victory at the AJ Bell Stadium.
Caton-Brown's third try three minutes from the end proved the decisive score in a frenetic finish after Salford themselves had fought back to lead 24-22 having trailed 16-0.
Wakefield then sealed their seventh straight triumph with a last-minute score from second rower James Batchelor to move joint-third in the Betfred Super League table.
Wakefield made the better start with a try in the sixth minute as Caton-Brown raced 70 metres to score after Ashley Gibson scooped up a loose pass and sent it to the left edge. Liam Finn added the conversion to give the visitors a 6-0 lead.
Salford enjoyed plenty of pressure and forced Wakefield to drop out twice in quick succession. Michael Dobson's kick through to the Wakefield in-goal was also narrowly missed by winger Niall Evalds.
But the visitors extended their lead in the 23rd minute with a try that bore many similarities to the first. Sam Williams and Finn linked well to put centre Reece Lyne clear and he sprinted 80 metres to score, just evading a valiant chase from Salford's Ben Murdoch-Masila.
Wakefield scored a third try six minutes before half-time when Lyne went in for his second try after taking the pass from Max Jowitt following good approach play from Williams. Finn's touchline conversion made it 16-0.
But Salford gave themselves a lifeline with a try just before half-time. Gareth O'Brien's pass to the wing saw Jake Bibby score in the corner and Dobson added the extras from touch.
Ian Watson's side kept the momentum going after the restart, scoring a second try in the 51st minute when prop Craig Kopczak barged over from close range and Dobson's conversion meant Wakefield's lead had been cut to just four.
And when Todd Carney's perfectly placed 40-20 kick gave Salford a scrum in a dangerous position, there was an air of inevitability as they loaded the right side on the next play and the Australian's pass sent Bibby over in the corner for his second try.
Dobson again converted from touch to make it 18-16 to the home side.
Having been forced to defend for so much of the half, Wakefield got a rare chance to attack the Salford try-line 15 minutes from time after forcing an error to earn a scrum.
The ball was quickly moved to the left and Caton-Brown produced a flying finish for his second touchdown, with Finn adding the extras.
Wakefield's lead lasted eight minutes as Salford replied through prop Lama Tasi, who charged his way over from close range for a try which Dobson goaled to give the home side a 24-22 lead.
Just as it looked like Salford were going to hang on for victory, Wakefield produced a late fightback with Caton-Brown notching his treble with three minutes remaining and Finn's goal made it 28-24.
With time almost up, Wakefield confirmed victory with Batchelor charging through for a try which Finn converted.
Wakefield coach Chris Chester hailed the character of his team: "There is plenty of character in this side and I thought it was a really good team performance in tough circumstances.
"We played for the full 80 minutes - even with five minutes to go we still had that belief that we could get over the top of them. On the whole we probably edged it. We completed really high in the first half and then gave them a bit of a leg-up at the end of the first half which gave them a big lift going in at half-time. There was some great character shown and some good individual performances.
"Our squad is being tested but the guys who came in gave us some freshness and that helped us in the last 10 minutes. I thought they were two really good sides competing for places in the top four. It's nice to be in the top four again - it's a good position to be in."
On matchwinner Caton-Brown: "Caton-Brown has got pace to burn and he's had to wait for his opportunity.
"He is an outstanding young British talent and I'm pleased that he's playing some good footy. I don't know the ins and outs of why he left Salford but I'm glad he's playing for Wakefield Trinity and not Salford."
Salford coach Ian Brown on seeing his side's winning run halted: "In the first half we dominated field position which seems a strange thing to say when you go in 16-6 down. We didn't give Wakefield a sniff of our goal line apart from our errors and invited them to score.
"Little bits of our attack were probably off in certain areas - whether that's a build up of fatigue I don't know. Wakefield took their opportunities and we didn't. We haven't defended as we should have. It's up to us now to recover."