Oldham struck two second-half goals against Crewe to secure their first League One victory in five games.
Crewe keeper Alan Martin kept his side in it before the break with a string of fine saves, while Matt Derbyshire also had a goal disallowed for offside.
But the visitors took a deserved lead when substitute James Tarkowski powered home an unmarked far-post header from Lee Croft's deep corner.
And Derbyshire bundled in a close-range second from Cristian Montano's cross.
The closest Crewe came to scoring was an early header against the post from manager's son Harry Davis, while Luke Murphy clipped the bar with a 20-yard free-kick in injury time.
Steve Davis's side drop three places to 18th, having not won in six games, while Oldham climb to 19th.
VIEW FROM THE DRESSING ROOM
Crewe manager Steve Davis told BBC Radio Stoke:
"That is probably the worst we have played at home for about a year. We never got going and were second best on the night. We had too many players below par and Oldham worked hard for their manager.
"Our keeper Alan Martin kept us in the game in the first half. He was one who could be proud of his performance.
"I've always said we're going to have some blips because every game at this level is an education for our young players. Saying that, they know they've got to be better than that. Now it is about how they react."
Oldham Athletic manager Paul Dickov told BBC Radio Manchester:
"That's how we know we can play, and as good as we were with the ball, I thought we were excellent without it.
"We've not been winning games, but for long periods in games we've been playing well.
"The one thing we've had to do is keep the belief in the team and individuals.
"It was a fantastic performance, but we have to draw a line under this and not get too carried away because we've got a tough game on Saturday."