UCD will face Bray Wanderers in a play-off final at a neutral venue in two weeks as they withstood a valiant Treaty United comeback to prevail on aggregate at the UCD Bowl.

The Students carried a hefty three-goal lead into the second leg following Colm Whelan's late show at the Market’s Field on Wednesday night.

They were stunned by two superbly-taken goals, one in each half, from Conor Melody and Anthony O’Donnell, as the vocal travelling support from Limerick began to believe.

An unfortunate red card for Stephen Christopher took the wind out of their sails, however, and Adam Verdon poked home the decisive goal as Treaty’s wild adventure finally came to an end.

Tommy Barrett's side have been a breath of fresh air in their first League of Ireland season as a squad assembled in the final week of pre-season exceeded all expectations.

And they looked set to do so once again as the dogged determination, and no small amount of skill, that has defined their season briefly had Treaty on the ropes.

UCD boss Andy Myler has altered the side’s shape since a mid-season wobble but their renewed defensive solidity deserted them at the Bowl.

There were just eight minutes on the clock when a mix-up between Eoin Farrell and Harvey O’Brien presented Melody with a chance to pull back the first of that three-goal deficit.

The midfielder anticipated the loose ball and volleyed low into the left-hand corner of Lorcan Healy’s goal, though the keeper may feel he should have kept it out.

With a raucous away support cheering them on, Treaty grew in stature but they had some nervy moments at the back.

Tadhg Ryan did brilliantly to touch Liam Kerrigan’s goalbound striker over the bar, while Marc Ludden somehow managed to smuggle Whelan’s near-post header off the line.

UCD started the second half positively and Kerrigan’s effort just cleared the crossbar before he teed up Whelan at the back post only for the keeper to once again produce a top save.

Treaty doubled their lead against the run of play as Christopher curled a pinpoint cross to the backpost, where O’Donnell arrived on cue to power home a header.

Within moments, Christopher’s night was over, as he accidentally caught Farrell late with his studs, and referee Alan Patchell produced a straight red card.

Farrell was helped off with a nasty-looking injury and his replacement, Michael Gallagher, was lucky Dean George couldn’t take advantage of his loose touch to level up the tie.

With the extra man, UCD slowed the game down and patiently worked a move that led to the decisive goal as Whelan showed great skill to evade three defenders in the corner.

He found the late run of Dara Keane, who teed up his midfield partner Adam Verdon on the edge of the six-yard box to toe-poke home.

Sub Willie Armshaw had a chance to force a big finish when he wriggled free in the box but he put his header over the bar and it proved one challenge too many for Treaty.

UCD: Lorcan Healy; Eoin Farrell (Michael Gallagher 57), Harvey O'Brien, Sam Todd, Evan Osam; Jack Keaney, Adam Verdon (Evan Caffrey 83), Dara Keane; Liam Kerrigan, Paul Doyle (Mark Dignam 66), Colm Whelan.

Treaty United: Tadhg Ryan; Charlie Fleming (Matt McKevitt 79), Mark Walsh (Sean Guerins 81), Anthony O'Donnell, Marc Ludden; Clyde O'Connell, Jack Walsh, Conor Melody (Joe Collins 79); Joel Coustrain (Matt Keane 68), Stephen Christopher, Dean George (Willie Armshaw 79).

Referee: Alan Patchell (Dublin).