Luckless Sligo Rovers blew a lead for the second time in a week, as Dundalk came from 3-1 down to win 4-3 at The Showgrounds.
Former Rovers midfielder Chris Turner scored the equaliser from the penalty spot and then the winner with just five minutes remaining.
Two first half goals from Matthew Blinkhorn added to a second half strike from Raffaele Cretaro, had put the home side into a deserved lead.
But Michael McGowan and substitute Tiernan Mulvenna were also on the mark for Dundalk, who secured an unlikely comeback.
Rovers were without the suspended Danny Ventre and Martin Camano, and recalled Richie Ryan from injury as an emergency left-back, with Joe Kendrick switching to the centre.
Dundalk fielded without the injured Michael Collins and the banned Michael Daly. Former Sligo striker Darren Mansaram was brought into the starting 11, while James Creaney made a first appearance as a substitute.
Rovers had a bright start and were ahead after just four minutes. Owen Morrison was the architect, swinging a deep ball in from the right on his left foot. Blinkhorn was on hand at the far post to loop a header over goalkeeper Peter Cherrie and into the net.
The same players combined to create another great chance just two minutes later, when Morrison' delivery into the area, was powerfully headed goalwards by Blinkhorn, but Cherrie did well to tip it over the top.
But Dundalk upped their intensity after this setback, and pulled level on 14 minutes. Turner and Ger Rowe worked a short free-kick on the right, and when Rovers were unable to fully clear, the ball dropped to McGowan at the edge of the area and rifled it to the net.
Blinkhorn forced another fine stop from Cherrie midway through the half, when he snapped at a shot inside the box, but the Dundalk keeper got behind the ball.
But Blinkhorn wasn't to be denied again, and after Cretaro had brilliantly turned Thomas Heary and fed his strike partner, Blinkhorn fired through a defender and past Cherrie.
Just before that, McGowan had almost got his second of the game, when Turner's corner made his way to him at the far post, and his stunning shot was cleared off the line by Ryan's saving header.
Rovers started the second half just as positively as the first and they had the ball in the Dundalk net twice in the opening ten minutes.
The second time, when Michael McGrath finished after Cherrie had saved Morrison's shot, was ruled out for offside.
But there was nothing wrong with the first, as Cretaro capitalised on some industry from Eoin Doyle, and cleverly worked some shooting space before firing to the bottom corner.
Dundalk boss Sean Connor made a double substitution after this, introducing Mulvenna and Paul McAreavey, and it had the desired effect with Mulvenna firing home superbly from inside the area with just over 20 minutes left.
And then McAreavey got in the act, drawing a foul from Kendrick and winning the penalty that enabled Turner to level the sides again from the spot.
And Turner won it for the visitors when he lashed the ball home from outside the area, with just five minutes left.
Sligo Rovers: 1 Richard Brush; 2 Romuald Boco, 5 Alan Keane, 4 Joe Kendrick, 3 Richie Ryan; 7 Owen Morrison, 6 Conor O'Grady (captain), 8 Michael McGrath, 11 Eoin Doyle (13 Dean Marshall 69); 10 Raffaele Cretaro, 9 Matthew Blinkhorn.
Substitutes not used: 12 Rob Turner, 14 Christopher Kelly, 15 Brian Cash, 17 Ciaran Kelly.
Booked: Cretaro (41), McGrath (86).
Dundalk: 20 Peter Cherrie; 19 Simon Kelly, 6 Thomas Heary (captain), 5 Liam Burns, 3 Kevin McKinlay (14 Paul McAreavey 58); 2 Shaun Kelly (15 Michael Coburn 78), 18 Ger Rowe, 8 Chris Turner, 11 Michael McGowan; 9 Darren Mansaram, 10 Alex Williams (7 Tiernan Mulvenna 58).
Substitutes not used: 1 Chris Bennion, 17 James Creaney.
Booked: Turner (58), McGowan (64), Mulvenna (65), Mansaram 79.
Referee: Declan Hanney (Dublin).