Stephen Foster's header completed an impressive comeback as Crewe ended a 17-match winless run with a victory over fellow strugglers Brighton that gives the Alex a chance of survival in the Championship.
They closed the gap on second-bottom Brighton to three points but it all looked unlikely until Lee Bell's freak equaliser of Colin Kazim-Richards' opener.
Kazim-Richards headed the visitors ahead with his sixth goal of the season and the hosts looked to have run out of ideas before Bell's cross looped into the net just before the hour.
Then Foster headed home a Kenny Lunt corner shortly after to seal a vital win against a Seagulls side that slumped to a 10th defeat in 12 matches.
Befitting such an occasion, it was a scrappy start from both sides, although there were some promising early touches from the Alex's new defender, Algerian Madjid Bougherra.
Crewe had been playing the more effective football but it was the visitors, who made the most of the first clear opportunity of the game to take the lead in the 11th minute.
After an error from Luke Varney, Adam Hinshelwood's long throw was flicked on by Joe Gatting at the near post and although goalkeeper Ross Turnbull got a touch, Kazim-Richards had a simple header at the far post.
Brighton looked comfortable with their one-goal advantage although their goalkeeper Wayne Henderson had to be at full stretch to keep out Foster's flick from Lunt's free-kick.
When the Alex did create a decent opening, Varney rifled off-target after latching onto a neat pass from debutant Tony Grant.
Another crisp move sent Steve Jones into the box but his low effort was diverted over the bar by goalkeeper Wayne Henderson, while at the other end Guy Butters' header after a goalmouth scramble was held by Turnbull.
Crewe continued to pressurise after the break but as they were still unable to create decent openings, their frustration increased.
As they sat deeper, the hosts offered a real threat on the break and passes between Kazim-Richards and Gary Hart put Gatting into space but he failed to worry Turnbull with a weak shot.
Brighton were coasting and Crewe's equaliser in the 59th minute came as a shock, as much to goalscorer Bell as anyone else.
As the ball fell to the midfielder wide on the right, his mis-hit cross flew into the top corner of Henderson's goal to throw the Alex a lifeline.
And just five minutes later, the comeback was complete, Foster moving unmarked to the near post to head Lunt's corner past Henderson.
Brighton were stunned and their first attempt at a response saw Kerry Mayo fire over after he was fed by Richard Carpenter as Crewe continued to carry the greater threat.
Kazim-Richards continued to buzz and forced one save from Turnbull as well as flashing another effort wide, before Turnbull clawed away a Mayo free-kick.
Teams
Crewe Turnbull, Otsemobor, Foster, Bougherra, Tonkin, Lunt,Bell, Grant, Steve Jones, Taylor (O'Connor 90),Varney (Higdon 70).
Subs Not Used: Tomlinson, Walker, McCready.
Goals: Bell 59, Foster 65.
Brighton Henderson, El-Abd, Hinshelwood, Butters, Lynch,Hart (Carole 70), Carpenter, Mayo, Frutos (Hammond 50),Kazim-Richards, Gatting (McPhee 89).
Subs Not Used: Martin, Nicolas.
Goals: Kazim-Richards 11.
Att: 5,925
Ref: H Webb (S Yorkshire).