Tranmere went to town in the second half against Oldham, buoyed by a super strike from Chris Greenacre in first-half added time.
Greenacre volleyed home in style from a cross by Sam Aiston after the opening 45 minutes had produced few goalscoring opportunities.
Oldham had looked in control defensively but the goal seemed to un-nerve them.
Guy Branston and Marc Tierney picked up bookings for fouls shortly after half-time and from the second of them home skipper Jason McAteer planted a free-kick into the path of Ian Sharps who headed home into the left-hand corner in the 54th minute.
Oldham sent on substitutes Delroy Facey and David Eyres for the last half an hour in an effort to turn things round but instead it went from bad to worse.
Iain Hume picked out Gareth Roberts unmarked at the corner of the box in the 77th minute and the Wales international put a great left-foot shot out of the reach of goalkeeper Chris Day.
Oldham skipper Andy Liddell somehow scooped the ball over the bar from five yards out in the 83rd minute when set-up by Paul Warne and it summed up their night of woe.
Tranmere made it 4-0 in the fourth minute of added time. Substiute Danny Harrison was brought down by Branston and Greenacre fired home into the left-hand corner from the penalty spot.