Wigan 18 Huddersfield 4
Sam Tomkins added the crowning glory to a scrappy win which kept Wigan's hopes of climbing into the top-four alive.
With St Helens losing at Hull FC, the gap on their derby rivals has now been cut to two points.
Fourth-placed Wakefield are one point further ahead with five league matches remaining - starting with next Friday’s visit of Salford, who lost 23-4 to Castleford.
This was not a classic by any stretch - conditions had a bearing on that - but given the high-stakes nature of this, most fans would have taken any win before kick-off.
Wigan led 12-4 for most of the second-half and had the defensive grit to keep the Giants at jabbing distance away, before Tomkins crossed as the final hooter sounded. The full-back added the conversion.
In an error-littered affair, there were some individual positives, with Tom Davies again eating up metres with his strong carries and Liam Farrell and Sam Powell having their moments.
Both sides went into the game knowing defeat would strike a damaging dent into their opponents’ hopes of reaching the top-four.
Shaun Wane also wanted a performance, as well as a result, having been frustrated by their limp display in a 32-16 defeat at Leeds last Friday.
He ordered his players into the wrestling pit at the start of the week in the hope it would bring the bite back to their defence - and the ploy seemed to work, with the visitors crossing just once.
As expected, Powell replaced Josh Ganson in an otherwise unchanged Wigan side, while Huddersfield welcomed back forward Michael Lawrence for his first game since February. Centre Leroy Cudjoe was unexpectedly ruled out.
These sides had been impossible to split this season, with two draws - and identical league records since their last meeting - and level on points.
By the 35th minute, the score was locked after an exchange of unconverted tries, before Liam Farrell’s try put them 10-4 in front.
Wigan started solidly but two errors presented the visitors easy chances.
First, Ryan Sutton spilled the ball under a thunderous challenge by Sabastine Ikahihifo. Then, having survived that scare, Anthony Gelling’s misdirected pass put them on the ropes again, and allowed the Giants to take a 10th minute lead. Danny Brough angled a kick which eventually fell into Jermaine McGillvary’s hands, and Oliver Gildart was powerless to prevent him scoring and putting them 4-0 ahead.
But a mistake from the restart gave Wigan an early chance to restore parity, and after a lively attack - all passes and angles from short-range - Gelling made amends for his earlier mistake by prising open the Giants defence to lock the scores 4-4. Both kickers, Brough and George Williams respectively, were off-target.
Both sides struggled in the greasy conditions and after one of many errors, Wigan were indebted to a try-saving tackle by Gildart on Alex Mellor - before countering with an attack of their own which ended with a penalty between the sticks.
Wigan elected to run, rather than take the easy two, and the decision came back to haunt them as Thomas Leuluai lost possession early on and the advantage swung back in the Giants’ favour.
They proved equally as wasteful with the ball, and the frequent trill of Phil Bentham’s whistle made for a stop-start affair.
Despite the errors, Wigan did have chances, most notably when Powell darted for the line but dropped the ball.
But they tidied up their attack as the half unfolded, so much so there was a sense of inevitability when Farrell raced to touch down Powell’s stabbed kick in the 36th minute.
The bench-hooker added the conversion to make it 10-4 at the break. The second half started like the first - more spills than thrills - before Powell’s 51st minute penalty, for a play-the-ball infringement, opened up an eight-point cushion.
There was little activity, the loudest noise from the home fans coming when Tomkins was impeded attempting a quick tap, which went unpunished.
Wigan were looking the better of the two sides, but they struggled to find a try to kill off Huddersfield - Burgess twice went close, but couldn’t control the ball - to set up a tense finish as the game entered the final 10 minutes.
Tomkins stopped a runaway Ikahihifo, and Wigan’s line defence received a thorough test - which it passed with flying colours - before the former Man of Steel put the result to bed.