Goals from Adam Dugdale and Mathias Pogba kept Crewe up and set up a North End with a two-legged tie against Rotherham in the Play-Offs, despite John Welsh' second goal in as many games in injury time.
An early header from Dugdale was added to by Pogba on the hour mark to give the Railwaymen a 2-1 home win that was enough to secure their status in League One, despite the North End skipper's volley, whilst North End will host the Millers on Saturday evening.
Manager Simon Grayson made two changes to the side that defeated Gillingham the previous week, Scott Wiseman returning in place of Keith Keane and Neil Kilkenny coming into the side for Alan Browne in the middle of the park.
The game started in tense fashion, with both sides knowing that their fates were in their own hands, but it was the Railwaymen who broke the shackles first.
On nine minutes Bailey Wright made a great block to deny Crewe skipper Matt Tootle whose overlapping run down the right gave him a chance to check inside and shoot.
However, from the resulting corner they broke the deadlock. A deep cross came in from the left and whilst there was seemingly a foul at the back post on Jack King, the referee didn’t give and Adam Dugdale headed in past Rudd by from Jon Guthrie’s corner.
The Lilywhites tried to react quickly and on 13 minutes from their first corner, a Kilkenny shot was blocked and Gallagher’s inswinger was headed onto the roof of the net by Joe Garner from ten yards out.
The home side looked to double their advantage and a brilliant last ditch tackle by Wright denied Byron Moore who had raced through onto a ball that had ricocheted from Jack King’s tackle in the midfield.
King, again, had seemingly been fouled, but the referee let the play go on and Moore was clean through, but Wright got a foot in as Moore was about to pull the trigger and denied the Alex a second.
Just before the half hour mark a ball in from the right by Scott Wiseman found Paul Gallagher at the back post; a clever chest off to the left took the ball away from the Crewe defenders, but the No.12’s shot was blocked by Mark Ellis.
The Lilywhites started the second half much brighter and 70 seconds in Ben Garratt made a fine save to push Joe Garner’s shot round the post for a corner, which in turn almost saw Scott Laird get a cheeky back heel on target from Gallagher’s low cross from the right.
But it was the home side who struck a killer blow on the hour mark as Ikpeazu held off a challenge down the right, got the byline and pulled the ball back to Pogba, who fired home from eight yards out via a deflection.
In the wake of the goal three changes for North End saw Kevin Davies, Alan Browne and Chris Humphrey replace Beavon, Kilkenny and Holmes.
Declan Rudd prevented it being three with a wonderful save with 12 minutes left, flicking Ikpeazu’s chip onto the bar and then the roof of the net as spaces began to open, with North End pushing to get back into the game throwing men forward.
Paul Gallagher saw a dipping shot deflected wide and from the resulting corner Gallagher’s ball beat everyone but couldn’t be poked home as the game entered the final ten minutes.
Five minutes were added on and as the board was held up John Welsh buried a volley from the edge of the box to halve the deficit after Kevin Davies' nod down.
Joe Garner then fired over as North End threw everything forward in search of an equaliser, but the referee blew up after only three and a half of the signalled five minutes and the home side held on for the win that have them safety.
Crewe Alexandra line-up: Garratt, Tootle, Ellis, Dugdale, Pogba (Aneke, 74), Moore, Guthrie, Nolan, Turton, Ikpeazu (Leitch-Smith, 86), Grant. Subs not used: Phillips, Mellor, Clayton, Ray, Oliver.
PNE line-up: Rudd, Wiseman, Laird, Kilkenny (Browne, 61), King, Wright, Holmes (Humphrey, 62), Welsh, Garner, Beavon (K Davies, 61), Gallagher. Subs not used: Stuckmann, Keane, Buchanan, C Davies.
Attendance: 7,458 (2,232 away fans)
Referee: Mr A Haines