Crewe grabbed a 94th-minute winner at Morecambe to give Steve Davis victory in his first league game in charge.
The hosts went ahead when Kevin Ellison outmuscled Matt Tootle and he put away the rebound after his first shot was saved by Steve Phillips.
Ten minutes later, 17-year-old Nick Powell scored Crewe's equaliser with a shot from 25 yards.
Max Clayton, who made his England Under-18 debut in midweek, netted the winner from close range.
VIEW FROM THE DRESSING ROOM
Crewe manager Steve Davis told BBC Radio Stoke:
"I thought we were going to get a draw out of it. We deserved a draw.
"We went 1-0 down and I've talked about not letting that affect us and staying mentally strong.
"They were exceptional. After that, I think they'll start believing in themselves."