It's official - Wigan will finish the regular Super League season in second spot after this gutsy, impressive victory against Castleford.
Adrian Lam's side looked very-much in finals mode as they superbly handled the pressure-cooker conditions.
They only led 4-2 at the break from George Williams' try but had the composure and class to take a grip of the contest and, perhaps more importantly at this stage, the defensive fortitude to keep their opponents try-less until after the final hooter.
Castleford were reduced to 12-men after Jesse Sene-Lefao dropped his knees on a grounded Oli Partington in the 65th minute but the game was already wrapped up by that stage.
And it means the Warriors, who were ninth at the end of May, will have a home tie next Friday night against the side finishing third - either Warrington or Salford.
The winner of that game will go on to St Helens the following week to battle for a spot at Old Trafford while the loser has the safety net of another game.
Thomas Leuluai won the official man of the match award but this was no one-man show, and it was the cohesion and collective desire of the side which really stood out.
Wigan emerged wearing black armbands in memory of St Pats stalwart, George Herring.
As expected, Sean O'Loughlin and Ben Flower returned from injury lay-offs, replacing young half Harry Smith and suspended Liam Farrell.
Cas' lost their cool and their way at times, but they contributes to a physical affair.
Wigan went into the game knowing only victory would secure second spot - while Cas' needed a win to ensure their place in the play-offs.
The high-stakes led to a tense, nervy opening half with several errors and few flashy passages. The size of the crowd may have been impacted by the late switch to accommodate the Sky cameras, but they made their voices heard as Wigan edged the first-half 4-2.
Jamie Ellis' early penalty interrupted the early scrappy exchanges. Joe Burgess defused a couple of Cas' half-chances and his fellow three-quarters injected some speed into their play to get their side on a roll, but too many sets broke down - with Romain Navarrete among the chief culprits.
That was, at least, until Williams utilised his dangerous running game midway through the first-half to step and jet his way over. Zak Hardaker's surprising miss put the hosts 4-2 up.
Cas' were physical down the middle and it needed an aggressive defensive effort to keep them at bay. When Joe Greenwood - restored to starting line-up - was penalised for a tip-tackle on Mike McMeeken, it provided Ellis the position to lock the score from 35m out, only for his strike to drift wide.
And on the stroke of half-time, another penalty effort hit the upright. Early into the second-half, Wigan showed more intent and took a firm grip with a rapid-fire double salvo.
Hardaker chased his own stabbed kick and when Minikin spilled, the full-back on hand to ground. He converted to make it 10-2.
First, Dan Sarginson broke through a splintered defence and advanced the ball before being hauled down. He may have been better served passing to the supporting Hardaker or Bevan French, but it mattered little as two long passes to the left allowed Greenwood to plunge the ball down. This time Hardaker was off the mark.
Sarginson was withdrawn with a leg injury, forcing Willie Isa into the centre role, and a combination of solid defence - and Cas' poor last-play options - preserved the Warriors' 12 point gap heading into the final quarter.
And the hosts then turned the screw, first trampling down field for Gildart to muscle over. Hardaker was again off-target but he struck a penalty minutes later after Sene-Lefao had seen red.
Morgan Smithies, again outstanding, continued the feel-good factor with a late try though Cas' had the final say - albeit after the final hooter had sounded - when Cheyse Blair went over for a try which proved scant consolation.
Wigan: Hardaker; French, Sarginson, Gildart, Burgess; Williams, Leuluai; Clubb, Powell, Partington, Isa, Greenwood, Smithies. Subs: Byrne, Navarrete, Flower, O'Loughlin.
Castleford: Rankin; Clare, Mata'utia, Blair, Minikin; Trueman, Ellis; Watts, McShane, Millington, Sene-Lefao, McMeeken, Massey. Subs: Holmes, Cook, Clarkson, Smith.
Referee: James Child