Non-League Bangor Celtic came close to forcing a replay in this well-attended FAI Cup tie at Richmond Park on Saturday.
Such was Shelbourne's anxiety in the second half that referee Paul McKeon cautioned the Premier Division leaders for time wasting towards the end.
Having led comfortably at the break, they were forced back on the ropes in the second half. Celtic's effort was such that the man of the match award went to their midfielder, Richard O'Driscoll, who led his side's dominance of that area of the pitch.
O'Driscoll's headed effort on 55 minutes, after Shelbourne goalkeeper Steve Williams could only divert Ger Fogarty's shot into his path, put Bangor back on track. Fogarty pulled another goal back with 10 minutes remaining to set up a grandstand finish.
The first half, however, had seen Shelbourne on top and after just two minutes, Stephen Geoghegan found the top lefthand corner of the Celtic net with a deft chip.
James Keddy added their second with a low shot past Steven Geraghty on 20 minutes and Dessie Baker followed suit two minutes later.
Bangor Celtic: Geraghty, Phillips, Hayden, Gallagher, Fitzpatrick, Galvin, Fogarty, D Stout, O' Driscoll, Devereux, Cronin. Subs: S Stout for D Stout (69 mins), Turley for Philips (79 mins), Condon for Fogarty (82 mins).
Shelbourne: Williams, Hutchinson, Campbell, Scully, Heary, Keddy, Doolin, Fenlon, R Baker, S Geoghegan, D Baker. Subs: Van Der Velden for Doolin (62 mins), Haylock for Scully (75 mins).
Referee: P McKeon (Dublin).