With seven minutes of normal time remaining Latics were 1-0 up against league leaders Peterborough through Thelo Aasgaard’s goal direct from a corner and were looking good value for their lead.
But just when it looked like they would move out of the relegation zone they pressed the self-destruct button in a crazy three minute spell, first allowing Posh to draw level from a Jonson Clarke-Harris header before Tendayi Darikwa gave away an unnecessary penalty and Clarke-Harris converted the spot-kick.
Latics drop a place to 23rd and are now effectively two points from safety due to an inferior goal difference. Peterborough move four points clear of second placed Lincoln City at the top of the table.
Leam Richardson made two changes from the team which defeated Bristol Rovers on Tuesday with Gavin Massey and Dan Gardner replacing Thelo Aasgaard and Will Keane in the starting eleven.
On a difficult pitch the league leaders started brightly and Siriki Dembele fired wide of the target in the second minute.
Both teams were showing good attacking intent in the opening minutes with Latics getting plenty of players forward.
The hosts might have been reduced to ten-men on 12 minutes when Posh captain Mark Beevers’ two-footed challenge on Viv Solomon-Otabor was deemed not to be a red card offence by referee Thomas Bramall.
Joe Dodoo went close for Latics soon afterwards when Gardner’s free kick flicked off a Posh defender before the Ghanaian striker crashed his header against the post from eight-yards out.
Massey then went close for the visitors on 26 minutes as Christy Pym saved bravely at close range to deny him when he looked odds on to score.
Ward curled a free kick narrowly wide at the other end as the hosts tried to assert themselves. But Latics were pressing high and denying Posh their usual time on the ball.
Solomon-Otabor got to the byeline and crossed on 35 minutes and although Curtis Tilt was in a good position his header was wayward.
Dodoo then had a driving run towards goal on 36 minutes but the striker was well tackled by Nathan Thompson as he was about to shoot.
No more chances before the interval but Latics had matched the league leaders and had created the better chances in the first half.
Peterborough started the second half on the front foot and looked to improve on their first half display but Latics handled the pressure well and limited the hosts to half chances. Clarke-Harris headed wide on 52 minutes and Jamie Jones saved well from Dembele.
But Latics gradually got themselves back into the game and created several goalscoring opportunities. The hardworking Callum Lang forced a good save from Pym low down to his right on 59 minutes and two minutes later Solomon-Otabor’s left footed shot from the right was well saved by the Peterborough keeper.
On 71 minutes Massey cut inside the box and his right foot shot nearly found the bottom corner but Pym once again did well to turn it around the post.
Substitute Thelo Aasgaard gave Latics the lead soon after coming onto the field. The Norwegian midfielder produced a superb in-swinging corner which flew past Pym into the far corner of the net. A great piece of skill by the young academy graduate.
It looked like Latics would go on to secure the three points that would take them out of the relegation zone but on 82 minutes disaster struck as substitute Harrison Burrows was allowed time and space to cross from the left and Clarke-Harris headed home from inside the six-yard box.
Two minutes later and Dembele jinked his way into the box past Darikwa and the Zimbabwe international made a very risky challenge from behind, referee Bramall deliberated for a second before pointing to the penalty spot.
Clarke-Harris stepped up and sent Jones the wrong way from the spot kick.
George Johnston and Will Keane replaced Massey and Solomon-Otabor as Richardson pushed players forward.
Dembele showed some embarrassing play-acting while Darikwa was trying to take a free kick and was later yellow carded when complaining to the referee.
In five minutes of added time Latics went in search of what would have been a deserved equaliser and Dodoo’s strike nearly found the top corner but Pym made a vital save and Posh held out.
It was a hard blow to take after Latics who had matched their in-form opponents and had more shots on target than their normally prolific hosts, but they continue to make crucial defensive mistakes which is hampering their progress away from the relegation zone. If they can cut out the mistakes they surely have a fighting chance of survival.