Tranmere Rovers shot themselves in the foot by giving away two soft goals in a North-West derby defeat at Boundary Park.
Oldham had been the better side during the first half, but they did not find a breakthrough until a pair of defensive howlers helped them to take a commanding lead.
Neal Eardley and Chris Taylor made the most of their chances as Oldham ensured Rovers boss Ronnie Moore had a day to forget against his former club.
There was a lifeline for Rovers when Michael Jones scored his first senior goal, but young Oldham striker Lewis Alessandra performed the same feat as Tranmere dropped out of the top six.
The visitors could have gone in front early as John Mullin planted a header goalwards and was denied by Oldham keeper Mark Crossley.
Jennison Myrie-Williams also went close, but Oldham dominated much of the play and Taylor tested keeper Danny Coyne with two efforts from outside the box.
Oldham went ahead in the 41st minute after visiting captain Ian Goodison made a clumsy challenge on Lewis Alessandra, who was going away from goal and received a double punishment, a penalty and a knee injury.
Goodison was carried off before Eardley converted from the spot, sending Coyne the wrong way as the keeper dived to his left.
Oldham doubled their lead just before half-time and Coyne got in a terrible tangle with Shane Sherriff. He just about prevented an own goal, but Taylor tapped in from three yards.
Oldham stayed on top but Tranmere scored a surprise reply in the 70th minute when substitute Chris Greenacre set-up Mike Jones, who drove low into the net from 12 yards.
Any fears among the Oldham players that Tranmere would peg them back were allayed seven minutes later, when Alessandra slotted in a simple chance from six yards after good work by on-loan Leeds striker Leon Constantine, who was making his full debut for the Latics.
The result sentenced Tranmere to two consecutive defeats, but gave Oldham's play-off hopes a shot in the arm.