Prince Mutswunguma scored a stoppage-time winner as Waterford twice came from behind to prevail in a cracking, rollercoaster tie a the UCD Bowl to reach their first FAI Cup semi-final since 2009.
Enjoying much of the early possession, UCD passed the ball well with their in-form strikers Liam Kerrigan and Collie Whelan worrying the visitors' defence for the first time on eight minutes, the latter blazing over the top.
That was forgotten four minutes later as Whelan, with his Ireland under-21 manager Jim Crawford in attendance, scored a sublime opening goal to give UCD's blistering start its due reward.
Outfoxing the experienced Greg Halford, Whelan skipped into the box and drove a low shot past Brian Murphy for his 20th goal of the season.
Having reshuffled their line-up, Waterford relieved the pressure with a strong run from Junior Quitirna snuffed out by a superbly timed recovering tackle from Evan Osam.
Quitirna and Isaac Tshipamba then set up the well positioned Mutswunguma, who shot wastefully wide as Waterford came right back into the game.
And they clinically punished sloppy defending to deservedly level on 36 minutes.
The lively Quitirna was alert to a loose pass to cut in from the right and drill his shot past Lorcan Healy from just inside the area.
The now dominant visitors might then have been ahead two minutes before the break; Tshipamba just couldn’t reach Cameron Evans’ inviting cross from the left.
Blues’ started the second half as they finished the first, Phoenix Patterson shooting over the top after good work from Quitirna two minutes in.
But it was UCD who regained the lead on 49 minutes.
A slaloming run by Whelan opened Waterford up. He slipped the ball into the path of Kerrigan who took a touch before smashing a shot to the far corner for a wonderful finish.
In end-to-end play, Waterford hit back on 66 minutes. Sam Todd took down Mutswunguma to concede a penalty which was emphatically dispatched by Patterson.
Back at the other end, Murphy came into his own with two crucial saves from Whelan within minutes.
First, the 38-year-old was out quickly to smother the ball at the feet of Whelan who had been played through one-on-one by Paul Doyle.
Murphy then went the right way to push Whelan’s 72nd-minute penalty round a post after Kerrigan had been taken down by substitute Jeremie Milambo.
Not to be outdone, Healy made a terrific save back at his end to deprive Mutswunguma on 80 minutes after Quitirna cleverly worked the opening.
The drama continued until the death, though, as Blues won it in the 91st minute.
Despite UCD’s appeals for a foul on Whelan, Patterson got forward to cross for Mutswunguma to tap in from close range.
UCD: Lorcan Healy; Evan Osam, Harvey O’Brien, Sam Todd, Evan Weir; Paul Doyle (Adam Verdon 78), Jack Keaney; Liam Kerrigan, Dara Keane, Mark Dignam; Colm Whelan.
Waterford: Brian Murphy; Darragh Power, Greg Halford, Kyle Ferguson, Prince Mutswunguma; Isaac Tshipamba (Jeremie Milambo 57; Jack Stafford 84), Cameron Evans, Niall O’Keeffe, Phoenix Patterson; Junior Quitirna; John Martin.
Referee: Rob Hennessy (Clare)