Huddersfield held off Salford to record their second successive victory.
Jermaine McGillvary and Brett Ferres gave the visitors an early lead only for Dan Holdsworth to convert tries from Vinnie Anderson and Jodie Broughton to put the Reds in front.
Greg Eden and Jason Chan put the Giants back ahead but Danny Williams and Sean Gleeson levelled the scores.
Michael Lawrence's effort and three goals from Scott Grix gave Huddersfield the win.
For Salford the defeat leaves them without a victory in four games and means their distant play-off hopes are now all but over.
Paul Anderson's second win as Giants coach sees them pull five points clear of eighth placed Hull KR, who lost at Bradford Bulls, and they are now all but ensured a spot in the play-offs.
McGillvary touched down in the corner after neat attacking play and Ferres got his first for the Giants since his move from Cas as Huddersfield carried on where they left off against Catalan Dragons last week.
The hosts, knowing what defeat would mean, fought back strongly and, after Anderson collected Luke Patten's pass to go over, went ahead before the break when Holdsworth converted Broughton's try in the corner.
Eden restored Huddersfield's advantage straight after the break and Chan's score looked to have set them on the way to victory.
Salford came roaring back once more and Williams went over from Gleeson's pass before the Hull KR-bound player went over himself to level the match.
Huddersfield were not to be denied and two Grix penalties either side of converting Lawrence's try gave them a win that helps them carry some momentum into the final rounds of games.
VIEW FROM THE DRESSING ROOM
Salford coach Phil Veivers:
"It was a bit of a dour game and we came out on the wrong side.
"We could have snatched it but probably didn't deserve to win.
"We turned over too much ball and all the tackling took its toll, but we didn't defend all that badly apart from a soft try near the end."
Huddersfield coach Paul Anderson:
"I'm happy with the two points and performances in certain areas. Salford tried hard but we gave them a lot of opportunities to score points.
"At times we played direct and under no pressure but at other times we gifted possession by trying to pass our way out of trouble. I have told the players they have to earn the right to give off-loads.
"But a top-eight place is our target and these two wins keep us in the frame. Bradford have done us a favour beating Hull KR and now we have to win against Bradford next week."
Salford: Patten, Broughton, Gibson, Williams, Gleeson, Holdsworth, Howarth, Sidlow, Anderson, Boyle, Ashurst, Adamson, Wild.
Replacements: Owen for Gibson (7), Gledhill for Sidlow (17), James for Boyle (20), Paleaaesina for Wild (25).
Huddersfield: Eden, McGillvary, Cudjoe, Wardle, Murphy, Grix, Lee, Crabtree, Robinson, Mason, Chan, Ferres, Lawrence.
Replacements: Faiumu for Crabtree (22), Moore for Robinson (34), Fa'alogo for Mason (21), Cording for Chan (48).
Sin Bin: Cudjoe (20).
Ref: Ben Thaler (Wakefield).