Cobh Ramblers ended leaders Dundalk's unbeaten record as they moved within a point of John Gill's side after a dramatic ending to the top of the table clash at St Coleman's Park.
Ramblers captain Alan Carey sent an injury time free-kick from the half way line into the visitor's penalty area, and with Cobh defender Shane Guthrie challenging goalkeeper Chris Bennion the ball sailed into the net.
Earlier Bennion was the hero when he denied Carey with a brilliant penalty save after 33 minutes.
The game seemed to be heading for a scoreless draw until Carey scored that 91st minute winner.
It was the former Cork City and Waterford defender's fourth league goal of the season making him joint top scorer, but he will surely admit to having luck on his side with the winner after goalkeeper Bennion had played very well until his late misjudgemenet.
Dundalk were the only unbeaten team in the country before kick-off with a fourteen match unbeaten record in the league, Cobh who were beaten in the FAI Cup seven days earlier, were twelve league outings without a defeat coming into this clash.
Both sides made changes from their previous weeks FAI Cup outings, Dundalk who had recorded a home win over Athlone brought in the experienced Vinnie Perth in place of suspended Shaun Williams.
Ramblers who were hammered 4-1 by Munster Senior League side Douglas Hall, brought back Graham Cummins and Michael O'Shea in attack, with Brian McCarthy and Jamie Nolan dropping to the substitutes bench.
The home side started very well and forced four corners in the opening four minutes, with Davin O'Neill having one header deflected for a corner.
Dundalk came closest after 23 minutes when a direct free kick from David Crawley was well saved by young Stephen Deasy.
Ramblers looked as if they would take the lead after 33 minutes, when Graham Cummins was brought down in the penalty area by Aidan Lynch, but goalkeeper Bennion made a brilliant diving save to push away skipper Carey's spot kick.
Then came Carey's dramatic late winner which moves Cobh on to 33 points from 15 games, just now one point behind the county Louth side and stretches their own unbeaten league record to thirteen matches.
Cobh Ramblers: Deasy, Carey, Meade, Murray, Guthrie, O'Neill, Barrett, Kearney, Cambridge, Cummins, O'Shea.
Subs: McCarthy for Cummins 85 minutes.
Dundalk: Bennion, Flanagan, Crawley, Lynch, McCauley, Marney, O'Connor, Perth, Smyth, Hughes, K Dunne
Subs: R Dunne for K Dunne 62 mins, Mullvenna for Smyth
82.