Wigan survived an almighty scare before maintaining their excellent recent record against Castleford Tigers with a tense victory at the Wish Communications Stadium.
The Warriors came into this match having won seven of their last eight meetings with Castleford, the exception a 22-22 draw in June 2011.
After Rangi Chase had struck the post for Castleford with a late drop-goal attempt, it was Chris Tuson who had the final say when taking Sean O'Loughlin's excellent offload to cross for his second try.
Wigan were penalised three times early on, yet it was Castleford's first transgression that proved costly. Sam Tomkins was lifted above the horizontal during a tackle and, from the resulting penalty, Ben Flower took Blake Green's short pass to cross, with Pat Richards adding a simple conversion.
Jordan Tansey burst clear for Castleford moments later, only to be called back with referee Thierry Alibert having spotted a forward pass. Another scare for Wigan followed when Tomkins lost the ball inside his own 10-metre line, but some solid defence kept the Tigers at bay.
The visitors gradually upped their game and were rewarded for a period of pressure when Richards rounded off a flowing cross-field move before adding a second successful kick.
Cas saw an excellent try-scoring opportunity go begging when Carney got away down the left yet failed to release Lee Gilmour on his inside. They were immediately punished as Josh Charnley rose to parry a high kick backwards, leaving Tuson with a simple close-range finish.
Wigan's lead was reduced prior to the interval when Carney atoned for his earlier error by laying on a score for Jake Webster, who exhibited pace and strength to go over in the corner. Yet Michael McIlorum was allowed to worm his way over from dummy half at the start of the second period and Richards added the extras to make it 22-4.
After Green had been held up over the line, Castleford hit back in sensational fashion. Ellis went in under the posts following excellent work from Webster, who made the initial break from inside his own half, Tansey and Daryl Clark.
Ellis duly converted and was soon adding another two points after Carney had capitalised on a surging run from Gilmour by powering through tackles from Charnley and Tomkins on his way to the line.
A 40-20 from Ellis kept Wigan on the back foot and the influential Carney stepped in off his wing to grab another try, with the resulting conversion levelling the scores.
Chase then hit the upright and Matty Smith had a pop at goal charged down at the other end before regathering to start the attack that led to Tuson's crucial score.