Nicky Maynard scored a stunning volley with almost the last kick as MK Dons dramatically won under the lights at Stadium MK.
His magnificent strike extended the Dons’ unbeaten run in the league to six while also moving the Dons up a place and further closing the gap on the pack of teams above them.
Robbie Neilson freshened up his side for the visit of the Latics, handing first starts to Stuart O’Keefe, Robbie Muirhead and Maecky Ngombo, while Dean Bowditch also came in.
It was the visitors who started the better of the two teams – Tope Obadeyi headed wide when well placed before Aaron Amadi-Halloway forced David Martin into a save.
However, the best opening of the first 15 minutes fell to the Dons but, after being found by Joe Walsh, Dean Bowditch couldn’t pick out Ngombo inside the box.
The men from MK1 began to improve and Bowditch got in behind and delivered dangerously for Kieran Agard on 20 minutes but the 11-goal man was unable to turn home.
Dons’ No.9 was again involved midway through the half as he fed Agard, who twisted and turned before seeing a low drive deflect behind for a corner – nothing came from the resulting set-piece.
Following a lull in proceedings, Oldham’s Amadi-Hollway was presented with another headed opportunity five minutes before the break but he directed his effort off target.
At the other end, Ngombo cut in and fired wide as the Dons looked to end a frustrating half on a high.
Neilson introduced Harvey Barnes and Chuks Aneke 10 minutes into the second half as he aimed to freshen up the attacking look to his side.
It didn’t take long for Aneke to get involved as he tried to free Agard through the middle – only a foul from Oldham’s captain Peter Clarke denied the forward latching on to the ball.
Shortly afterwards, Maynard replaced Bowditch while, at the other end, Latics substitute Darius Osei dragged an effort wide on a counter attack.
The Dons were dominant in terms of possession and territorial advantage but they were finding it difficult to create any clear-cut chances against a stubborn Oldham defence.
An opening did arrive on 70 minutes when a smart turn from Aneke granted him some space but he dragged his shot wide from 20 yards.
Barnes was also making an impact as the game continued to be played in the Oldham half but chances were still few and far between as the visitors remained firm.
Clever play from Darren Potter offered an opportunity to Aneke but he was crowded out before Barnes saw a shot blocked from just inside the area.
The men from MK1 continued to apply pressure until the final whistle and Maynard came up trumps deep into injury-time with a superb volley from just outside the box, sparking superb scenes as the Dons stretched their unbeaten run in the league to six.
Starting XI: Martin; Baldock, Downing, Walsh, Williams; Potter (c), O’Keefe; Agard, Bowditch (Maynard 63), Muirhead (Aneke 54); Ngombo (Barnes 54).
Unused subs: Nicholls, Tilney, Brittain, Upson.
Goal: Maynard (90+6)
Attendance: 7,598 (209 Oldham fans).