Oldham produced a storming fightback to beat Notts County 5-1 and move into the Johnstone's Paint Trophy Northern Area semi-finals.
It was a miserable night for new County manager Shaun Derry, who saw captain Dean Leacock sent off and has now lost his first two games in charge.
Oldham's Danny Philliskirk's hit the post with an early piledriver, but County struck after 13 minutes when Ronan Murray wriggled free inside the box and slotted home an angled eight-yard shot.
Oldham levelled on the half-hour as Korey Smith crossed from the right and James Tarkowski volleyed in from close range.
The Latics led on the stroke of half-time when Philliskirk blasted in from the penalty spot, sending keeper Fabian Speiss the wrong way after Yoann Arquin's shove on James Dayton.
County went down to 10 men in the 55th minute as Leacock was adjudged to have hauled back Jonson Clarke-Harris just outside the box and was sent off for denying a clear goalscoring opportunity.
Oldham cashed in after 67 minutes, with Philliskirk teeing up the unmarked Dayton to score with a low drive from 10 yards.
And Philliskirk struck again six minutes from time when he collected Dayton's pass 12 yards out and slammed in his second of the night.
Oldham's teenage substitute Jordan Bove was sent off in the closing stages - just two minutes into his debut - for a high tackle on Kieron Freeman.
But Oldham made it five in injury time as Philliskirk's shot was saved and Clarke-Harris tapped in the rebound.