Joe Garner popped up with a last-gasp equaliser to earn Wigan a 1-1 Sky Bet Championship draw against his former club Ipswich.
The Tractor Boys had played for almost three-quarters of the game with 10 men after the sending-off of Jonas Knudsen.
But they took the lead just after the half-hour mark through Will Keane's penalty, after Collin Quaner had been fouled by Chey Dunkley.
And it looked as though a misfiring Wigan side would lose against their relegation opponents before Garner – on as an 81st-minute substitute – steered home from close range to leave Latics five points above the bottom three.
Ipswich, looking to improve the worst away record in the Championship, started brightly as they looked to complete a rare 'double' in an otherwise dismal campaign.
Former Wigan loanee Keane saw a shot helped round the post by Jamie Jones at full stretch.
And the Town striker almost applied the finishing touch at the far post after Matthew Pennington flicked on the resulting corner.
Despite the positive opening, Town were rocked on their heels on the 25-minute mark when Leon Clarke got goalside of Knudsen, who dragged down his man and was awarded a straight red by referee Lee Probert.
The wall did its job from the free-kick by Reece James, and the follow-up from Josh Windass, but Wigan looked set to take over control of the game.
However, in the 32nd minute, the visitors went ahead against the odds, when Quaner raced into the Wigan box only to be helped to the ground by Dunkley.
The referee pointed straight to the spot, despite plenty of protests from Wigan's players.
And Keane made them pay the ultimate price when he found the bottom corner of the net, via the fingertips of Jones and the left-hand post.
Wigan's attempts at a response were not great, as Windass headed way over from James' cross, and with Anthony Pilkington nodding wide from a Kal Naismith delivery.
Rather than sitting back on their lead, Town pushed for a second goal, and it almost arrived shortly after the restart.
Alan Judge pulled the trigger from 25 yards and Jones had to move swiftly to tip it away from the top corner.
Wigan raised their game but were still lacking something in the final third.
Clarke could only flick wide after great work from Windass, and he did likewise after a fine cross from Michael Jacobs from the left.
That was the signal for Wigan to go for broke, with Nick Powell and Callum McMananan coming on for Dunkley and Pilkington.
But James and Naismith failed to test the goalkeeper from the edge of the area.
Wigan's final move was to throw on ex-Ipswich forward Garner for the last nine minutes, Windass the man to make way.
And he was immediately into the game, getting on the end of a Lee Evans cross only for Bartosz Bialkowski to make a fine save.
But Garner was not to be denied and, as the game ticked into the first of six added minutes, he did find the net.
James did all the work, and in truth Garner could not miss at the far post as he prodded home past the goalkeeper.
Wigan almost won it right at the death, but Bialkowski just about got in the way of a speculative strike from Jacobs.
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport staff');
ga('pacontentapi.set', 'dimension2', 'a00628a1-3a60-4905-b4ab-17c229ab05c8');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:club-news,paservice:sport:football,paservice:sport:match-reports');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Joe Garner strikes at the death to deny his former club'});