Paul Scholes suffered his first defeat as Oldham Athletic manager, but Morecambe left it late before leaving Boundary Park with all three points.
Latics were looking to close the gap on those in the playoff places to just three points with a win but started on the back foot when the visitors took a fourth minute lead.
Piero Mingoia was given the freedom of the right-hand side to pick out the perfect cross for Jordan Cranston who didn’t waste the opportunity and swept the ball beyond Daniel Iversen into the back of the net.
Cranston was denied shortly afterwards, as Iversen got the better of him, he also produced a fine save from Carlos Mendes Gomez as the visitors looked to double their lead.
Paul Scholes’ Oldham finally sprung into life with Jose Baxter, Peter Clarke and George Edmundson all forcing fine saves from Mark Halstead.
Latics wouldn’t be denied though as Baxter finally got his name on the scoresheet with 14 minutes left in the game.
Johan Branger’s cross from the left-wing allowed Baxter to plant a fine header into the net from all of eight yards out.
Oldham then pressed for the winner, but it was the visitors who would break the home fans hearts as the game ticked into stoppage time.
Liam Mandeville set up Aaron Collins to slot home and steal the three points for the Shrimpers.
The defeat drops Latics to 11th in the League One table but they remain six points outside the playoff places with 13 games left.