Josh Charnley crossed twice as Wigan went level at the top of Super League table after a nervy win.
They claimed the two points which sent them joint-top with Hull FC - ahead of their clash against St Helens.
And they helped ensure the neutrals were again treated to an entertaining, seesawing Thursday night contest.
At times it was scrappy, snaggy and sloppy. There were too many penalties, stoppages and errors.
But in a strange way, those combined to make the game more dramatic, and the victory even more satisfying for Wigan.
Matty Smith was assured, and kicked well both in play and in front of goal, while Sam Tomkins again made further strides on his comeback.
The opening half - which Wigan edged 14-12 - was pacey and punctuated with big hits from both sides. The game dragged for passages after that - it finished after 10pm - and though the Tigers persisted, the visitors held their nerve and kept them at jabbing distance away.
To try and avoid a third successive loss at the Mend-a-hose Jungle, Wane had changed the training ground pitch markings to match those at the compact ground.
His line-up was, as expected, missing injured captain Sean O’Loughlin but he was replaced with another England international, Joel Tomkins.
Castleford had ex-Warrior Danny Tickle, Larne Patrick and on-loan Wigan halfback Ryan Hampshire in their side.
The Tigers had posted 86 points in their last two matches but the Warriors’ confidence was boosted by their 40-8 triumph against Leeds at the Magic Weekend - their biggest win of the season.
They took a slender 14-12 lead by the break after a first-half with more needle than class, but enjoyable none the less.
Early Wigan pressure earned them a chance on the Tigers’ line, and a sharp pass by George Williams sent unmarked Josh Charnley racing over for his first of two tries. Smith’s first conversion made it 6-0.
But the Tigers drew level five minutes later, Luke Dorn alert to Paul McShane’s offload. Luke Gale converted and after Dom Manfredi turned over cheap possession, the Cas’ halfback added a penalty from a squabble which followed.
Sam Tomkins, impressive a week ago, continued his strong form. First he pulled off a try-saving tackle on runaway Denny Solomona, and then moments later - at the other end - put Wigan back ahead.
He chased Smith’s weighted grubber and dived low to beat Dorn to the ball and twist over.
Wigan were feeling the penalties harder than usual on such a short pitch, and after Cas’ marched down field, Gale’s looping pass fell into Solomona’s path and he swept over for his 19th of the year, extending his lead at the top of the try-scoring charts.
With Gale unable to convert, it locked the score 12-12.
But Wigan nudged back ahead before the break.
The ball squirted from Paddy Flynn’s clutches under a crunching tackle by Willie Isa and, when the visitors won a penalty, Smith poked them 14-12 ahead. A melee, sparked by Bateman’s retaliation on Adam Milner, was not the only drama before half-time. Jake Webster was sinbinned for comments to referee Ben Thaler after he blew for half-time, ignoring their calls for a penalty.
Just like the opening half, Wigan needed just three minutes for a winger to score - this time it was Manfredi. He deserved the try for a break from inside his own half, and with Smith calm under pressure, Wigan took a two-score, 20-12 lead.
Gale’s penalty reeled that lead in to six points as Webster rejoined the action. But Wigan showed nice attacking class for their next try, finished by Charnley after a crisp passing exchange to the left. Smith was again on target and added a penalty in the 57th minute to make it 28-14.
Cas’, though, were proving pesky opposition and when Webster punished a soft right-side edge to angle over, converted by Gale, it cut Wigan’s lead to eight points.
Sam Powell - his head heavily-bandaged - looked to have eased the Warriors’ nerves, hacking on a loose ball to score a try. Smith missed his first conversion of the night, but at 32-20 with 10 minutes to go, they looked firmly in control.
But the Tigers - pardon the pun - roared back, Solomona squeezing in at the corner for his second of the night and 20th of the campaign. And with Gale hitting the conversion - his fifth goal - it closed the gap to a nail-biting six points, until Smith’s drop-goal effectively sealed the win.
Wigan, into a block of away games while the DW has annual pitch maintenance, travel to Salford next Friday.