From the outset, the hosts began to find openings down the right through intricate combinations from Christopher Forrester and Ger O’Brien and the students were thankful to Mark Langtry in the 16th minute as the full-back cleared a Conor Kenna header off the line.
Within four minutes Greg Bolger headed wastefully over after a mazy run from John Russell. The latter’s forays from midfield looked especially threatening as the half progressed and Daniel Ledwith timed his tackle to perfection to deny Russell a scoring chance in the 24th minute.
However, there was a degree of inevitability about the opener. Forrester and O’Brien combined again to force a corner and when James Chambers picked out Fagan, the centre-forward drove confidently to the net from eight yards.
A second goal should have arrived within a minute as Jake Kelly swung an inviting left-wing cross but Fagan mistimed his jump and headed wastefully over as the visitors struggled to contain the by-now rampant hosts.
Another chance arrived from another set-piece in the 33rd minute as the students left far too much room at the back-post for former player Greg Bolger, who volleyed over from ten yards.
The half ended with another St Pat’s attack as Bolger raced through from midfield but his impudent shot from the edge of the area drifted narrowly wide of Mark McGinley’s right-hand post to conclude an impressive opening-half from the Saints.
Despite their supremacy, the hosts remained susceptible with only a goal lead and the visitors almost levelled in the 52nd minute through an inspirational run from defence by captain David O’Connor, who ran half the length of the pitch before exchanging passes with Graham Rusk before shooting agonisingly wide.
Both Fagan and Russell should have settled the contest either side of the hour mark before Fagan once again spurned a glorious opportunity in the 75th minute, shooting straight at McGinley when given a clear passage towards goal.
It was former UCD captain Bolger who looked most likely to seal the crucial points and, after hitting the upright in the 77th minute, he availed of glorious approach play from Forrester to tap home from close range ten minutes from time.
ST PATRICK’S ATHLETIC: Clarke; O’Brien, Kenna, Browne, Bermingham; Forrester (Meenan, 83), Chambers, Bolger, Russell, J Kelly (O’Connor, 71); Fagan (D Kelly, 76).
UCD: McGinley; Langtry, D O’Connor, Douglas, Nangle (Benson, 46); P O’Connor, Rusk (Belhout, 80), Corry, Ledwith; Lyons, Morrison (Kavanagh, 46).
Referee: Pauric Sutton (Clare)