Ronnie Moore grabbed his first win back with Rotherham United when supersub Drewe Broughton came off the bench to make it 3-2 and seal a hard fought three points.
The Millers had been behind twice to goals from Steve Schumacher and Calvin Zola but strikes from Kevin Ellison, a penalty from Adam Le Fondre and Broughton secured an excellent three points.
The Millers fans that travelled to Northampton on Tuesday will have had a feeling of déjà vu when after a positive opening by the Millers it was the home side that opened the scoring after 6 minutes.
An angled ball to the far post found Zola and the striker laid a perfect first time cross into the six yard box where Schumacher raced in for an easy tap-in from four yards out.
Rotherham weathered the Crewe storm and fought back to equalise on 14 minutes. Kevin Ellison whipped in a devilish corner from the far side that deceived 'keeper David Button and nestled straight into the top corner.
Zola looked a real threat in attack for Crewe and he showed his ability on the ground when he fired in a bullet shot from the edge of the area that flew just over the bar. Just after the half hour Zola was close again when a cross to the back post by Joel Grant just eluded his head when the striker was well placed to score.
Adam Le Fondre was a lively figure up front for the Millers and in the 39th minute he showed great skill to beat Harry Worley before dragging his shot wide from a tight angle.
Crewe Alexandra 1 v 1 Rotherham United
The Millers were on the attack straight away at the start of the second half and Le Fondre showed his predatory instincts when he stretched to shoot from six yards but his effort was blocked.
On 51 minutes the home side came close when Luke Murphy ran towards goal but his shot from 20 yards was wide of the near post. That effort proved to be a warning when a minute later a mistake by Nick Fenton was punished by Zola who rounded the defender and then coolly slotted the ball past Warrington and into the net.
The Millers almost made an instant response when Nicky Law shot from the angle but Button got down low to make a smart save.
Crewe could have sealed the game in the 56th minute when defender Worley was presented with a free header eight yards out but he guided the ball high and wide. A minute later and the Millers attacked down the right through Le Fondre who darted into the box only to be felled by Worley. The referee, Trevor Kettle, pointed to the spot and Le Fondre dusted himself down to shoot past Button and into the corner to equalise.
Crewe should have been in front again in the 64th minute when Zola was teed up with a simple tap-in from six yards but he missed his kick. The ball was cleared as far as Murphy whose shot from 18 yards was brilliantly parried by Warrington.
Soon after Law caused problems down the right and his centre found Ellison at the back post but his shot was weak and smuggled clear off the line.
The game seemed destined to end level but with five minutes remaining the Millers snatched the points. Ellison nodded the ball to sub Broughton inside the area and with his back to goal he spun superbly before arrowing the ball over Button and into the net.
Crewe Alexandra 2 v 3 Rotherham United
Crewe: Button; Brayford, Worley, Mitchell-King, Westwood, Grant, Schumacher (Walton), Bailey, Murphy (Shelley), Zola (Moore 88), Miller.
Subs not used: Bogden, O'Donnell, Elding.
Rotherham: Warrington; Tonge, Fenton, Sharps, Green, Law, Mills, Harrison, Ellison, Pope (Broughton 74), Le Fondre.
Subs not used: Annerson, Warne, Liddell, Lynch, Joseph, Cummins.
Att: 4253 (683)