10-man Oldham Athletic secured a valuable three points against promotion chasing Bolton Wanderers.
Lee Erwin smashed home the winner on the goal line 15 minutes from time to give Latics all three points.
Michael Ngoo was sent off just after the hour mark for a second bookable offence.
The result also meant goalkeeper Connor Ripley extended his clean sheet record to 17 games, one behind the club record of 18 held by Les Pogliacomi.
Manager John Sheridan named two changes to the Oldham Athletic team which beat Fleetwood Town last weekend.
Aaron Amadi-Holloway did not recover from his injury and was replaced by Ngoo, whilst Jamie Stott was a late addition to the squad as he replaced Anthony Gerrard who was injured in the warm up.
It would be Stott’s first professional start for the club. The defender has been with Latics since eight years of age.
Latics started well and it would be Erwin who had the first shot of the game on five minutes.
He turned on the edge of the box and curled towards the bottom corner but it deflected wide of the goal.
The striker had another opportunity five minutes later as he received the ball from Ngoo but volleyed wide of Mark Howard’s goal.
Bolton started to dominate proceedings but Stott, along with captain Peter Clarke and Brian Wilson, did well to keep the lively visiting strikers at bay.
The Trotters put the ball in the box at every opportunity but could not feed off the scraps as Pratley wasted two opportunities.
He ballooned both of his efforts over the crossbar from similar ranges as both sides struggled to create clear cut opportunities.
Bolton striker Adam Le Fondre was a threat for the visitors and five minutes before the break he almost made the breakthrough.
He turned Stott on the edge of the box but the youngster recovered to make a block from eight yards to deny the striker.
Latics put the pressure on towards the end of the half but it was goalless at the break.
Goalkeeper Ripley had to be aware minutes after the break as Morais broke free on the right but he was out quickly to deny the winger.
Athletic almost took the lead on 52 minutes and what a goal it would have been.
After Clarke’s first effort was parried, the ball found its way to Paul Green who struck on the volley from 25 yards but Howard managed to save on his goal line.
Ngoo was booked a minute later for a late challenge on Bolton defender David Wheater.
Latics almost took the lead from an unlikely source as Wilson struck a volley from the edge of the box but it just went wide of Howard’s goal.
McLaughlin was on hand to clear off the line on the hour mark as Pratley was storming in but the right sided player did well to get rid of the danger.
Minutes later, Ngoo received his marching orders for a late challenge on a Bolton defender which saw Latics reduced to 10 men.
With Bolton Wanderers piling on the pressure, Latics looked very bright on the break and should have taken the lead on 72 minutes.
Erwin was set free in the penalty area but, from 12 yards, the striker struck wide of the goal.
The striker managed to atone for his error three minutes later, however, as he put 10 man Latics ahead.
It was superb work from striker Obadeyi who delivered the cross into the box and a mix up allowed Erwin to poke the ball home on the goal line to put Athletic ahead.
Bolton started to pepper Ripley’s goal but Latics stood firm and defended heroically.
The visitors struck the crossbar twice in the final 10 minutes, first from Wheater’s header and secondly from substitute Chris Long’s thunderbolt from close range.
Latics almost doubled their lead in the final minute of additional time as Obadeyi broke free but the ball ran away from him.
However, that did not matter as the referee blew time on the game and Latics moved six points clear of the relegation places with only three games to go.
Oldham Athletic: Ripley, Stott, Wilson, Clarke, McLaughlin, Fane, Banks, Green, Obadeyi, Erwin, Ngoo.
Subs not used: Kettings, Law, Edmundson, Mantack, O’Neill, Flynn, Croft.
Bolton Wanderers: Howard, Moxey (Henry 79’), Dervite, Beevers, Vela, Spearing, Osede (Long 86’), Pratley (Clayton 70’), Morais, Wheater, Le Fondre.
Subs not used: Turner, Karacan, Wabara, Wilkinson.
Goals: Oldham Athletic (Erwin 76’) 1-0 Bolton Wanderers