Striker Chris Porter secured Oldham's play-off place with a second-half winner at home to Chesterfield. Top scorer Porter headed high into the net from Simon Charlton's right-wing free-kick after 56 minutes to earn the Latics all three points.
Oldham had much the better of the game and Porter and Andy Liddell both wasted early chances to open the scoring.
Will Haining forced Barry Roche to tip over and Sean Gregan headed wide before Porter nodded in their winner.
Oldham: Pogliacomi, Eardley, Haining, Gregan, Charlton, Liddell, Wellens, McDonald (Edwards 85), Taylor (Rocastle 90), Porter (Glombard 71), Warne.
Subs Not Used: Blayney, Roque.
Goals: Porter 58.
Chesterfield: Roche, Lowry, Hazell, Downes, O'Hare, Picken, Niven (Davies 78), Allott, Hall (Shaw 61), Larkin (Jackson 68), Ward.
Subs Not Used: Kovacs, Bailey.
Booked: Allott.
Att: 8,148.
Ref: E Ilderton (Tyne & Wear).