Struggling Crewe gave new manager Gudjon Thordarson some hope as they grabbed their first away League One win of the season.
Thordarson takes over on Tuesday and after this performance he'll believe he has a chance of saving the side from relegation. For Hartlepool, though, the prospects are bleak on this form.
A see-saw first half looked like ending goalless until Crewe took a shock lead in the dying seconds.
Clayton Donaldson got away on the right after a good Crewe break and when he crossed low to the far post, John Brayford got there to force the ball in from close range.
Earlier, Alex thought they should have had a penalty when Donaldson went down under a challenge by Ben Clark, but play was waved on.
Joel Porter twice went close for Hartlepool, his glancing header well saved by Stuart Tomlinson on 26 minutes after he had earlier volleyed over the bar.
Tomlinson also saved, at the second attempt, from a header by Andy Monkhouse, while at the other end home keeper Arran Lee-Barrett saved bravely at the feet of Donaldson.
Hartlepool were level three minutes after the break, when Porter finished with a great angled shot after cutting inside from wide on the left.
But two goals in five minutes gave Crewe control, Shaun Miller claiming the first after getting the last touch to Danny Shelley's right-wing cross, before Luke Murphy blasted in a spectacular 20-yarder on the hour.
With that sort of lead Crewe were looking comfortable and hard though Hartlepool tried to get back into the game, chances were few and far between for the home attack.
And they gave Crewe a fourth on 82 minutes when Miller blasted his shot into the roof of the net after Lee-Barrett's awful clearance from deep in his own penalty area.