Oldham face an anxious final day of the season after they crashed to defeat at mid-table Chesterfield.
Ian Evatt's 69th minute strike coupled with wins for Torquay and MK Dons means the Latics will go into their last match against Bradford just one point above the drop zone.
Ronnie Moore's men approached the game knowing a victory would guarantee League One football at Boundary Park next season.
And former Chesterfield man Luke Beckett missed a glorious chance to set them on their way after just eight minutes when he hooked Jermaine Johnson's inch-perfect cross over from six yards.
Chesterfield fought back and Mark Hudson had a powerful drive deflected wide before skipper Evatt's close-range header was disallowed for offside on 27 minutes.
Ten minutes later French Striker Tcham N'Toya-Zoa forced Leslie Pogliacomi into making his first save with a long-range effort which the Aussie keeper held well.
Oldham defender Guy Branston then headed against the bar before Beckett had a goal disallowed for offside as the visitors pressed.
With other scores going against them, Oldham knew they had to score and Delroy Facey almost made the breakthrough on 75 minutes when he forced his way into the box and drove a shot against Marton Fulop's legs.
But it was Chesterfield who took the lead when Evatt fired home at the second attempt after Pogliacomi had kept out his close-range effort from Mark Allott's long throw.
But despite the defeat Oldham's fate remains in their own hands and they will be safe if they can overcome the Bantams at home next Saturday.