Zak Hardaker returned to haunt former club Castleford Tigers as Wigan Warriors sealed second place in Super League with a 26-8 victory at the DW Stadium on Thursday.
Hardaker, sacked by the Tigers last year after failing a drugs test, scored one of five Wigan tries as the defending champions ensured they will have home advantage in the first round of the play-offs.
George Williams, Joe Greenwood, Oliver Gildart and Morgan Smithies also touched down to leave Castleford - who had Jesse Sene-Lefao sent off in the second half - needing minor premiers St Helens to avoid defeat against Hull FC on Friday to stay in fifth spot and prolong their campaign.
Wigan will face either Warrington Wolves or Salford Red Devils in a qualifier for a place in the semi-finals, with the losers in that game getting a second opportunity in the following round of fixtures.
The hosts led 4-2 at the break, the lively Williams side-stepping Mike McMeeken and darting through to touch down after an early penalty from Jamie Ellis, who missed the chance to level when another strike from the tee rattled the post on the stroke of half-time.
Wigan scored two tries in the space of three minutes to rock Castleford early in the second half, Hardaker capitalising on sloppy defending to get on the end of his own grubber kick before Greenwood crossed.
Hardaker laid on a score for Gildart and the ex-Leeds Rhinos man was on target with a penalty after Sene-Lefao was given his marching orders for dropping a knee into Oliver Partington's head while he was on the floor.
Smithies shot through a gap to add a fifth Wigan try late on, with Cheyse Blair's finish at the other end no consolation for Daryl Powell's well-beaten side.