Seβn Francis scored twice as Shamrock Rovers regained the leadership of the Premier Division with this scarcely convincing win.
The goalscoring prowess of Francis was the chief difference between sides which are expected to be at opposite ends of the table come the latter part of the season. But the defensive frailty which cost them a 2-0 defeat in Derry last Thursday was present again at times as Rovers had to dig deep for the three points.
Rovers manager Damien Richardson kept faith with the same 11 that lost to Derry, and they wasted little time in redeeming themselves, momentarily at least, as they took a 16th-minute lead.
Marc Kenny's corner had the pace and direction to pick out Francis at the back post and his header was deemed to have crossed the line after UCD goalkeeper Barry Ryan had punched it off his right-hand upright.
UCD might have been level on 32 minutes. No defender tracked John Martin who arrived in front of goal to head powerfully over the bar from a Ciaran Martyn cross.
The fright didn't seem to wake up Rovers and they were punished for sloppy defending on 43 minutes. With Clive Delaney a menacing presence on the edge of the area, Pat Scully and goalkeeper Tony O'Dowd hesitated to attack Dara Ryan's cross and McAuley nipped in to nod in a soft equaliser.
A dour second-half sprung to life courtesy of another defensive howler, this time at the other end, on 62 minutes when Francis pounced on a loose backpass.
UCD might have levelled two minutes, but Palmer cleared off the line from John Martin. The big defender was then up at the other end on 70 minutes to meet Dunne's long free-kick to the back post and score Rovers' third goal with a downward header.
SHAMROCK ROVERS: O'Dowd; Costello, Scully, Palmer, Dunne; Kenny, Tracey, Colwell, Woods; A Grant, Francis. Subs: Robinson for Kenny (68 mins.).
UCD: B Ryan; Mahon, Purdy, Delaney, D. Ryan; J Martin, O'Dowd, McNally, Martyn, McAuley; O'Connor. Subs: Lynch for O'Connor (70 mins), R Martin for O'Dowd (74 mins).
Referee: A. Kelly (Cork)