A magnificently struck 75th-minute winner by winger Stephen Hurley from 16 yards earned UCD another vital three points against St Patrick's Athletic at Belfield Park.
College - now with just one defeat in their last 11 games - started the stronger when Derek Doyle had a header pushed over by goalkeeper Barry Ryan, following a long throw-in on the right by Anto Murphy.
But it was St Patrick's who almost took a surprise lead on 14 minutes when defender David Bell had a long-range effort fly just over the bar with Darren Quigley out of position and scrambling to get back on his goal-line.
The Inchicore men had a set-back just three minutes later when central defender Colm Foley was forced to retire with a leg injury, the captain being replaced by Barry Prenderville.
College skipper Tony McDonnell did have a chance to break the deadlock early in the second half only for his header to go over the bar following a cross from the left by defender Mick O'Donnell.
Then a clever move on 64 minutes between Paul Dicker and Hurley set up an opening for Doyle only for his downward header to bounce straight into the arms of the alert Ryan.
UCD eventually grabbed the lead on 75 minutes when Hurley fired home a tremendous effort into the left hand corner of the net, giving Ryan no chance.
Inevitably, McDonnell was involved in the build-up.
From there, UCD were happy to shut up shop and hold on for the three points.
UCD: Quigley; Mahon, Kenna, McNally, O'Donnell; Hurley, Dicker, McDonnell, D Doyle; McWalter, Murphy. Subs not used: Lynch, Gannon, Sammon, Shorthall, Gallagher.
ST PATRICK'S ATHLETIC: Ryan; Quigley, C Foley (Prenderville, 17), Maguire, Bell (Flood, 78); Fahey, Caffrey, Donnelly (Maher, 51), M Foley; R Doyle, Rowe. Subs not used: Perth, Clarke.
Referee: D Hancock (Dublin).