When Stephen Atkinson kicked a penalty goal four minutes into the second half to stretch Castletroy's lead out to 17-7, things certainly looked grim for the west Cork school.
But just when it seemed as if they would have to settle for another game through the back-door system, they produced a scintillating spell of play that yielded three magnificent tries and left Castletroy bitterly disappointed with the outcome.
Castletroy led at the interval thanks to two wonderful tries from centre Paul Clancy, both converted by Atkinson against a single try by skipper Colin Deane from Bandon.
Bandon's final quarter comeback started when winger Victor Lovell finally went over in the corner after a spell of heavy pressure.
Travis Coomey sent hearts racing when he surged over for a try under the posts that Greene converted to give Bandon the lead for the first time.
That made it 19-17 and Sean Hudson grabbed the fourth try two minutes from the end to leave his side worthy winners.
S Hudson, V Lovell, B Gur, E Greene, H Hall, E Palmer, J Crowley, J French, T Coomey, A Deane, C Scully, J Bradfield, N Beamish, C Deane (captain), R Stokes.
Replacements. M Archer, A O’Connor, D Ogden, P Jackson, B Hayes, S Minihane, J Donnelly, B Hodgins, T Beare, J Brady, B Matthews, N Barker.
E Murphy, B Richardson, P Clancy, A Kennedy, M Rowsome, S Burns, S Atkinson, A Myers, K O’Shea, M Bromell, R Keaveney, G Bourke, E O’Shea, C Bermingham, S English (captain).
Referee. C Harrington (MAR)
In the play-off round of the Munster Schools Senior Cup, St Munchins were drawn home to Castletroy and Crescent are at home to St Clements. Ard Scoil Ris got a bye to the quarter-finals in both Senior and Junior Cups.
in the Junior Cup, Glenstal are home to St Munchins and Bandon were drawn home to Crescent.