Gevaro Nepomuceno bagged a brace with Mohammed Maouche grabbing the other to down the Stags and end their four-game unbeaten run.
Tyler Walker and Neal Bishop both found the back of the net in the second-half but it wasn’t enough to steal a vital point.
Both sides started slowly as they found their feet.
The Stags had the chance to make the brighter start when Tyler Walker lashed wide from outside the box.
Oldham took the lead in the 29th minute through Nepomuceno.
Maouche expertly found the winger Nepomuceno, who controlled well on the run before firing home the opener.
The Stags searched hard for an equaliser before the break without breaking down the hosts.
Jacob Mellis’ probing cross was cleared before Malvind Benning blasted wide.
David Flitcroft’s charges continued to pile on the pressure with CJ Hamilton hitting over the bar and Ryan Sweeney nodding off target.
The second came in unfortunate circumstances as a game of pinball in the Stags’ box fell to Maouche to fire home in the 56th minute.
On the hour, Mellis played in Walker whose effort rolled through Daniel Iversen’s leg.
But the hosts reestablished their two-goal cushion as Nepomuceno smashed past Conrad Logan after a poor clearance.
Logan kept the Stags in the game by keeping out Callum Lang with a fine save.
bishop kept the game alive with 14 minutes left with a great turn and finish.
With ten minutes to go Mellis and Walker linked up well with the latter smashing over the bar.
Danny Rose thought he had levelled at 3-3 to earn a precious point that would have been enough to take the Stags into second place in the race for automatic promotion.
Rose reacted first to turn in the rebound after Jacob Mellis hit the post. But the Stags’ celebrations were cut short by the linesman’s offside flag.
Six minutes into stoppage time Mellis was agonisingly denied by the post.