A stoppage time goal from substitute Graham Cummins moved Cobh Ramblers into second place in the eircom League of Ireland First Division after this late, late win over Shelbourne at St Coleman's Park.
Cummins powerfully headed home at the far post a well-struck cross from another substitute John Kearney, which gave goalkeeper Tony O'Dowd no chance.
The biggest home crowd of the season saw Ramblers stretch their run to six games unbeaten, in which they have showed great defensive work by not conceding a goal.
Ramblers knew a win for them would have given them second place in the table following their good recent run of five games unbeaten in two competitions.
In that period of four wins and a draw the home side had not conceded a goal since their 1-0 defeat at Wexford Youths on 18 March.
Manager Dermot Keely, who had not much time to put a brand new Shelbourne team together after their financial difficulties saw the break-up of last season's Premier Division championship winning team, has steadied the ship in recent weeks with three games without defeat.
The nearest to a goal in the first half was a well-worked move by Stephen Henderson's side, which struck a post on half time.
Gareth Cambridge and captain Alan Carey combined down the right touchline, before Carey's cross was flicked on to Tony O'Dowd's post from eight yards, before being cleared to safety.
Shelbourne almost scored with five minutes remaining when their substitute Darren McKenna connected with a cross from Mark Leech, but his effort form seven yards flew over James McCarthy's crossbar.
Then Cummins struck for his first goal of the season in stoppage time to move Cobh into second position four points behind leaders Dundalk, who they drew with at Oriel Park last week.
Cobh Ramblers: J McCarthy; Carey, Meade, Murray, Guthrie; O'Neill, Coleman, Barrett (Kearney, 78 mins) Cambridge; Nolan (O'Shea, 80) B McCarthy (Cummins, 70).
Shelbourne: O'Dowd; O'Rielly, Collins, Brophy, Murphy;
Lacy, Harte, Crawford, Chambers (McKenna, 71); Leech, Moran.
Referee: Derek Tomney (Dublin).