Wigan Athletic were sunk in agonising fashion by a stoppage-time Swansea City winner after dominating their promotion-chasing opponents for most of the 90 minutes.
The Swans had led through Nathan Dyer's 12th-minute strike, but Latics took only nine minutes to get back on level terms.
Chey Dunkley was fouled as he tried to get on the end of a Joe Williams corner, and Kieffer Moore slotted home the spot-kick for his first goal in Latics colours.
For the rest of the game, Latics looked far and away the more likely side to go on and win it.
But after Jamal Lowe hit the bar, and Moore and Sam Morsy saw goalbound efforts blocked by desperate defending, there was to be a cruel twist with seconds remaining.
And substitute Sam Surridge was on hand to convert Connor Roberts' inviting delivery to send Swansea top of the Championship.