Waterford are through to the Munster final after an injury-time Ken McGrath point gave the Decies their first Championship victory over Cork in 16 years at Semple Stadium.
An enthralling second-half saw Waterford edge out the league finalists following an opening 35 minutes that lacked lustre.
Paul Flynn - so often inconsistent - played superbly and ended the game with 12 points to his credit, including three from play.
Cork were two points up in as many minutes at the opening of the game as Joe Deane returned from injury with a flourish.
It looked as if the positional changes Waterford made - Tony Browne and Dave Bennett in midfield and Eoin Kelly at wing-forward - were not going to yield dividends as Paul Flynn's free-taking kept them in the game for most of the half.
Ben O'Connor added two more for Waterford and with 15 minutes gone the sides were at 0-04 apiece, with Waterford yet to score from play.
Timmy McCarthy and O'Connor added another two, and Flynn again levelled the sides before Waterford took the lead through John Mullane after 25 minutes.
Ken McGrath was introduced to a huge roar from the Decies faithful a minute later and had an impact immediately as Waterford surged forward and Seamus Prendergast forced a save from Donal Og Cusack.
However it was all action the other end seconds later as Cork took advantage of the break and Joe Deane fed Eamon Collins who blasted past Stephen Brenner.
Paul Flynn pulled two frees back and Ben O'Connor added one for Cork to see the Rebels go to the dressing room 1-07 to 0-09 ahead.
At the opening of the second-half the sides exchanged two points before the break that Waterford needed came to them.
Tony Browne, from 60 yards, whipped a ball into the square which took a deflection and bounced past a surprised Cusack in the Cork goal.
Waterford now led by two and added four more from Paul Flynn (3) and Ken McGrath.
Cork were not about to give up and rallied as scores from Ben O'Connor, Timmy McCarthy, Seanie McGrath and Eamon Collins saw the Rebels only a point in arrears with eight minutes to go.
Joe Deane, who had started with two scores, stepped up to level matters with three minutes to go.
Cork threw everything at the Decies but the Waterford defence were superb in the closing minutes to withstand the pressure and in the 71st minute the inspirational Ken McGrath sent an effort over to seal the shock win and relegate Cork to the qualifiers.