Latics unbeaten home league record came to an end as Bradford City secured a surprise victory at the DW Stadium.
With the match appearing to be heading for a draw the Bantams stunned Latics in the 92nd minute through substitute Tyrell Robinson.
Bradford had taken an early lead when Charlie Wyke bundled the ball home but Latics soon levelled through Chey Dunkley’s header.
In an end-to-end second half both teams had plenty of chances, but it was Robinson’s late strike which took the three points back across the Pennines.
Latics kept the same team from their last league game against Blackburn Rovers, with Max Power retaining his place in midfield ahead of Lee Evans.
In a breathtaking opening period both sides had good goalscoring opportunities. Nick Powell’s early effort was well blocked by a defender.
The Bantams responded with Wyke wasting a good opportunity in the area and then Nathaniel Knight-Percival volleying over from close range.
The visitors went ahead on 14 minutes when Wyke bundled home from close range after Jones saved the initial shot.
Sam Morsy then had a shot cleared off the line before Latics drew level on 24 minutes following a corner.
Chey Dunkley rising high to powerfully head home from inside the six yard box.
Latics received a set back when they lost Nick Powell to a hamstring injury on 30 minutes.
Wyke nearly restored Bradford’s lead when his powerful effort crashed against the crossbar.
Then at the other end Michael Jacobs produced a superb swerving strike from 35 yards which keeper Colin Doyle did well to push away.
In the second half, Ivan Toney went close while substitute David Perkins forced a save from Doyle with a header at the back post.
In a frantic period Dan Burn then came to Latics’ rescue when he denied a Paul Taylor effort inside the box.
Latics were not at their best and Bradford had produced a battling away performance.
Both sides continued to push forward for the elusive winner but just when it looked as though neither team would get the upper hand substitute Robinson unleashed a drive from 20 yards which on another day keeper Jones might well have saved.
Despite the defeat Latics remain in second spot but are now four points behind leaders Shrewsbury. Bradford meanwhile move up to third place three points behind Latics.