Salford came close to pulling off a major upset in difficult conditions before Leeds Rhinos went through to the quarter-finals of the Challenge Cup.
Prop Lee Jewitt put Salford ahead when he crossed after just seven minutes.
Leeds' Shaun Lunt kicked through for Brent Webb to cross before half-time.
Salford winger Jodie Broughton won the race to touch down Daniel Holdsworth's kick after the break, but Ben Jones-Bishop and Lunt scored the late tries which put the Rhinos through.
Salford, playing against a strong wind in the first half, stunned Leeds by taking the lead after Jewitt took Wayne Godwin's pass to plough over from short range.
The Rhinos recovered to pile the pressure on the Reds but squandered several chances before the Salford line was finally breached four minutes before the break.
Lunt's grubber kick caught Salford off guard and Webb was the quickest to react with Kevin Sinfield landing the conversion to make it 6-6.
The Reds regained the lead after 51 minutes when Broughton sprinted on to Holdsworth's well-placed kick, but Leeds drew level 16 minutes from time when Sinfield's kick was fumbled by Broughton for Jones-Bishop to score.
Danny McGuire's dancing run enabled Lunt to go over after 71 minutes and Sinfield made no mistake with the kick.
VIEWS FROM THE DRESSING ROOM.
Leeds coach Brian McDermott told BBC Radio Leeds:
"it was hard work and there were some periods in the game where we had to ask some real serious questions and come up with the answers.
"Salford were always going to have a reaction from being on national television last week when they under-performed and I felt we showed some real mental strength.
"It wasn't about players, structures or shapes or anything we might have practised, we had to find some answers."
Salford coach Phil Veivers said:
"We got ourselves in a winning position at 10-6 but then we stopped playing and lost our go-forward.
"Leeds had a lot of opportunities in the first half but we scrambled well.
"This was a match we could have won but it wasn't to be."
This year's Challenge Cup quarter-final draw will take place on Tuesday, 1 May at 0820 BST, BBC Radio 5 live.
Salford: Patten, Broughton, Gleeson, Moon, Gibson, Holdsworth, Smith, Sidlow, Godwin, Jewitt, Ashurst, Adamson, Wild.
Replacements: Howarth, Paleaaesina, James, Nero.
Leeds: Webb, Jones-Bishop, Ablett, Hardaker, Hall, Sinfield, McGuire, Leuluai, Lunt, Peacock, Clarkson, Delaney, Bailey.
Replacements: Moore, L. Smith, Kirke, Griffin.
Referee: Steve Ganson (St Helens).