Longford Town - 2 Cork City - 1: Having failed, by their own accounts, to turn up for last season's Cup final, Cork City exited at the first hurdle from this year's competition, the victims of a spirited Longford revival and, more specifically, goals from Dessie Baker and Danny O'Connor.
Towards the end of a poor tie that had looked increasingly likely to require a replay on Monday night, City looked to have snatched a place in the next round when John O'Flynn capitalised on poor defending to fire his side in front.
The lead was short-lived, though, with Baker grabbing an equaliser from the spot five minutes later and O'Connor scoring a spectacular, 91st-minute winner that sparked wild celebrations among the home support.
The defeat is a major setback for City, whose away form in the league has already hindered their progress this season. Having meddled with the formation and got his fingers burned at the Brandywell last Saturday, Damien Richardson restored the width his side had so desperately lacked through the first half of the game with Roy O'Donovan and Colin O'Brien handed the task of running at the home side's fullbacks.
The switch certainly provided options when the visitors were looking to press forward, but City were simply too careless with their passing for Seamus Kelly to be seriously threatened and the former UCD and Bohemians goalkeeper had little to occupy him after an early O'Callaghan free.
Longford were little better at retaining possession, but they did manage a couple of decent chances. Robbie Martin first floated a fine cross beyond Michael Devine to the far post from where Dessie Baker turned his header too close to the goalkeeper, and Martin then did well to hold off Cillian Lordan after controlling an angled ball from Gary Cronin.
More than an hour in Andy Myler finally got a shot at goal but it too was week and misdirected, and the only replies City could muster before the goal were another O'Callaghan free and an O'Donovan shot from a particularly unpromising angle.
Kelly handled both of those tests comfortably, but when O'Flynn picked up the ball from O'Donovan 25 yards out with just under a quarter of an hour remaining he seemed slow to catch on to the threat.
His defenders did him few favours either, for the striker was given ample time to weigh up his shot that the goalkeeper still might have prevented reaching the bottom left corner.
Given the pace and pattern of the game until then that really should have been it, but the home side fought back smartly with Dave Mooney earning a penalty 12 minutes after replacing Myler up front.
The 21-year-old first robbed Dan Murray and then had his legs taken by Devine as he moved into the box. The goalkeeper was dismissed and Mark McNulty was quickly thrown on for O'Callaghan, but Baker's spot kick was coolness itself and the locals were level.
With their opponents now a man down, however, they didn't look happy to settle for it. Before the restart Alan Kirby came on for Cronin and the hosts set about the search for a winner.
It arrived in the first few seconds of added time when Baker's ball from the right was cleared as far as Danny O'Connor and the midfielder let fly from 30 yards out.
There will be few more important goals scored at Flancare Park this season and surely none better. After last year's disappointment Longford may just be about to rekindle their Cup romance.
LONGFORD TOWN: Kelly; Murphy, Doherty, Paisley, Prunty; Byrne (Fitzgerald, 49 mins), O'Connor, Cronin (Kirby, 84 mins); Baker, Myler (Mooney, 69 mins), R Martin.
CORK CITY: Devine; Lordan, Murray, Bennett, Murphy; O'Brien, Gamble, O'Callaghan (McNulty, 81 mins), O'Donovan; Fenn (Softic, 80 mins), O'Flynn.
Referee: I Stokes (Dublin).