Cork finished strongly to deny Waterford 1-19 to 0-19 at Semple Stadium and claim a place in the All-Ireland SHC semi-finals.
The Rebels’ strength in depth was crucial as they outscored the Decies by seven points to one in the final five minutes, with vital scores from sub Cathal Naughton and Pat Horgan.
Waterford looked set to make it through when they led by three points going into the closing stages, but it was the Rebels who had the men in reserve able to make a difference, with Naughton and youngster Darren Sweetnam helping turn a thriller in their favour.
Cork had early goal chances, with Luke O’Farrell smashing a shot against the crossbar and Waterford full-back Liam Lawlor making an important intervention.
Maurice Shanahan had just put Waterford in front in the eighth minute when Cork stepped on the gas with a string of scores, through Pat Horgan, Cian McCarthy, Pa Cronin and Jamie Coughlin.
And it was Coughlan, a late pre-match replacement for Conor Lehane, who got in for a 16th minute goal, blasting past Stephen O’Keefe after Cronin had gathered at midfield and released Luke O’Farrell.
But Waterford suddenly imposed themselves on the game, and outscored their opponents by nine points to four in the second quarter.
Kevin Moran switched to midfield and made a huge impact in curbing the influence of Daniel Kearney and Pa Cronin, while John Mullane took up a deeper role and set up a string of scores.
Maurice Shanahan steered over five from frees and play, with Pauric Mahony and Stephen Molumphy also claiming eye-catching points.
It was Molumphy who edged the Decies back in front in the 32nd minute, but the Rebels finished strongly, with Cian McCarthy and Pat Horgan giving them a narrow 1-9 to 0-11 lead at the break.
Shanahan brought the sides level for the fifth time, but Cork were able to get their noses back in front, with Horgan hitting his fourth point of the afternoon.
It was Michael Ryan’s side which was now getting on top in vital areas, and they were back in front when Shane Walsh swept over a wonderful score.
Level for the seventh time with Cork responding through Paudie O’Sullivan, the excitement was building in front of the huge Semple Stadium crowd going as the game entered the final quarter.
But once again Waterford stepped up the tempo, with Mullane striking over his shoulder for a gem, easing his side into a three-points lead after Shanahan had hit the target for the eighth time.
Jimmy Barry-Murphy emptied the bench, with John Gardiner making his first championship appearance of the season, and Cathal Naughton and Darren Sweetnam both making valuable contributions.
It all came good for them in the closing stages, with young Sweetnam getting heavily involved in the central area, displaying his creative qualities to set up the leveller for O’Farrell.
Cork tails were up, and they finished in style, with Naughton, Horgan and veteran Sean Og O hAilipin all floating over scores.
Cork scorers: J Coughlan 1-1, P Horgan 0-7 (4f), C McCarthy 0-3, P Cronin, P O’Sullivan, C Naughton 0-2 each, L O’Farrell, S Og O hAilipin 0-1 each
Waterford scorers: M Shanahan 0-9 (6f, 1 ’65), Pauric Mahony 0-3, S Walsh, J Mullane 0-2 each, S Molumphy, S Prendergast, T Browne (f) 0-1 each.
Cork team: A Nash, S O’Neill, S McDonnell, B Murphy, T Kenny, E Cadogan, S Óg Ó hAilpín, D Kearney, P Cronin, J Coughlan, C McCarthy, N McCarthy, P O’Sullivan, L O’Farrell, P Horgan.
Subs: D Sweetnam for Kearney, C Naughton for N McCarthy, J Gardiner for Cadogan, S Moylan for Coughlan, L McLoughlin for C McCarthy
Waterford team: S O’Keeffe, S Daniels, L Lawlor, N Connors, T Browne, M Walsh, K Moran, S Molumphy, Philip Mahony, Pauric Mahony, S Prendergast, M Shanahan, J Mullane, S Walsh, T Ryan.
Subs: E McGrath for Ryan, S Casey for S Walsh, R Foley for Browne
Referee: B Kelly (Westmeath)