Bottom beat top as ten-man City were on the receiving end of an upset at the Alexandra Stadium.
The hosts were indebted to a couple of outstanding first-half saves from Ben Garratt before Derrick Williams was dismissed seven minutes after the interval for a second yellow card.
It was a decision which changed the course of the game and Crewe grew in confidence, culminating in Jamie Ness striking a spectacular 73rd minute winner.
City pushed for an equaliser despite their depleted numbers, but Aaron Wilbraham and Aden Flint were both denied in the closing stages as the Alex held on for a shock victory.
Steve Cotterill was without the services of usual left-wing back Joe Bryan, who was absent from the squad with a thigh muscle injury.
Greg Cunningham took the place of the Bristolian in a like for like change, while Wilbraham was restored to the frontline at the expense of Matt Smith.
Both sides struggled to find any sufficient rhythm in the opening exchanges on a bobbly pitch not suited to moving the ball quickly.
It would take 17 minutes for either goalkeeper to be called into action, as Frank Fielding plunged to his right to keep out Anthony Grant after the midfielder turned neatly on the edge of the penalty area.
The 23 league places between the teams were not obviously apparent, and Crewe striker Uche Ikpeazu was looking the most dangerous player on display.
The Watford loanee is a powerful presence and held off an obvious foul by Mark Little to shoot into the grasp of Fielding when allowed to play on by referee Andy Haines.
Soon after, the 6ft 3in frontman breezed between Luke Ayling and Korey Smith to burst into the box but ultimately shoot tamely and again too close to the City keeper.
By then the visitors had been presented with their first notable opportunity after Wilbraham was upended just outside the area.
Up stepped Luke Freeman from a very central position, but his accurate shot was turned away by a combination of keeper Ben Garratt and his defender who retreated to the goal line just as the kick was struck.
Garratt would become increasingly busy as the first half wore on. City’s top scorer Wilbraham looked certain to score when Cunningham headed the ball back across goal and into his path, but the Crewe stopper was on hand to spread himself and make a crucial block.
Cotterill’s afternoon would take an early turn when he lost his captain on 31 minutes, as Wade Elliott was forced off with what looked a recurrence of the calf problem he sustained last time out against Crawley Town.
Marlon Pack entered the fray in Elliott’s place and City were soon nearly in front.
Freeman’s influence was growing and his run and cross from the left dropped kindly for Flint on the six-yard line, who had little choice but to instinctively blast the ball goalwards only to strike the top arm of Garratt who again performed miracles to keep the deadlock intact.
But the hosts had enjoyed their fair share of the play and threatened to take the lead themselves shortly before half-time at the end of a fine move.
Greg Leigh’s cross from the left was taken down by Grant, who accelerated into space with the same first touch, running on to the ball and hitting a firm shot well kept out by Fielding at his near post.
City were in need of some inspiration after the interval and Freeman nearly provided it within seconds of the restart.
After Cunningham surged into the box, the ball ran loose to the midfielder, who jinked into a shooting position on his left foot and sent a low effort just inches beyond the far post.
It was the sort of added intent Cotterill would have wanted to see from his players, but the size of their task would be doubled when Williams was dismissed for a second yellow card.
Having already been penalised for a lunging foul on Grant in the first half, the Irishman was late again on Ikpeazu just as the striker released the ball and was duly handed his marching orders by Haines.
Suddenly the home crowd was roaring and Nicky Ajose responded by cutting in from the left and sending a curling shot towards the far corner. The rooted Fielding was well beaten as the ball dropped just wide of his left upright.
Ten-man City did a good job of settling things down at that point before the contest exploded into life around the hour mark.
Wilbraham and Kieran Agard both had chances to put the depleted visitors in front – the first denied by a last-ditch block, the second skying his shot over the crossbar when it dropped his way 12 yards out.
Then Greg Leigh spurned a good chance for the home team, firing over the top before Ness struck the opener 17 minutes from time.
Receiving the ball in space 25 yards from goal, the midfielder steadied himself and dispatched an unerring drive inside the far corner to end City’s long run without conceding a goal.
Cotterill’s side were staring defeat in the face. Matt Smith was introduced for Agard before Wilbraham threatened a dramatic equaliser.
Waiting patiently under a bouncing ball, the striker caught his shot flush from a difficult angle only for Garratt to dive to his right and push it to safety.
City continued to push for an equaliser, but Flint’s header from a Jay Emmanuel-Thomas corner was smuggled off the line and the game was up.