A diving header from Craig Disley brought Bristol Rovers a stoppage-time win and robbed Oldham of a point they deserved.
The midfielder threw himself at a low cross from sub Sean Rigg to glance the ball away from keeper Mark Crossley.
Oldham, with a neat passing style, had looked the more composed side for the first hour but, when the pressure built up, Crossley kept them in the game with a string of point-blank saves.
Rovers were close to trouble as they insisted on using Andy Williams as a lone striker but gradually took over when they became more ambitious and threw extra players forward.
Little went right for Williams as Oldham centre-back Reuben Hazell had too much pace and experience for him.
He must have sensed from the second minute it was not going to be his night.
Then a sharp shot, turned around the post by Crossley's dive, saw Oldham given a goal-kick when he rightly anticipated a corner.
Midway through the first half he had a great scoring chance when Oldham defender Stefan Stam squared the ball to him.
Williams had a 30-yard run at goal but, with two defenders closing in, hurried his shot horribly high.
Oldham's gameplan looked the more methodical and they were close to taking a 20th minute lead when Davies' volley was parried at the near post.
This was Oldham's best patch and, from their fourth corner, Stam lifted a header a shade too high.
An inventive through ball by Rickie Lambert promised to unlock the game on the hour when Disley sped past defenders to meet it, but the final touch was just wide.
Rovers were now coming into the game with David Pipe seeing plenty of the ball on the right flank.
In their furious final assault, Oldham's keeper saved from Chris Lines, Rigg and Stuart Campbell while Craig Hinton sent a rising drive onto the bar.