Tranmere Rovers 0 Oldham Athletic 1
Craig Davies was the hero with a header in the fifth minute of added time and it was probably justice for the striker who had twice been denied by the woodwork earlier in the game.
Oldham hardly looked a relegation threatened side and were twice denied by the woodwork.
Chris Taylor fired wide after a good run through early on for Oldham and then a Neal Trotman effort after a corner was saved by Danny Coyne.
Anthony Kay flashed a header over from a Robbie Stockdale cross in a rare home attack, but the visitors were soon in the ascendancy again.
Trotman found the side-netting from Andy Liddell's free-kick and then a Deane Smalley shot was palmed away by Coyne.
The Latics looked in vain for a penalty on 19 minutes as Davies tangled with Coyne and Ian Goodison on the six-yard line.
The home fans were becoming very disgruntled and were not pleased when Shane Sherriff headed tamely wide following a Paul McLaren free-kick.
But it was soon better. A Chris Shuker shot was saved by Marlon Beresford after Tranmere's best approach work and then the keeper did well to keep out a close-range header by Goodison from a Kevin Cooper free-kick.
A Chris Greenacre volley was turned away for a corner by Beresford, but then came a let off for the Merseysiders just before the break when Davies put an angled shot against the outside of a post.
Tranmere should have been ahead four minutes into the second half but Kay failed to connect with a Cooper pass in front of a gaping goal.
Then it was Oldham's turn. Smalley missed the target when a Neal Eardley shot rebounded off Coyne and the keeper kept out another Smalley shot with an outstretched leg.
Oldham lost skipper Eardley with a leg injury just short of the hour with Mark Allott going on.
Tranmere soon after made a midfield change with Steve Jennings replacing Kay.
Then Cooper made way for Mike Jones and Oldham sent on Lee Hughes for Smalley as both sides looked for a break through.
Oldham went close on 85 minutes when Davies was denied by the crossbar.
But they won in at the death when Davies headed home from a cross by Andy Liddell.