Sligo Rovers had to survive a spirited late rally by UCD before extending their unbeaten run to 10 matches at the Showgrounds on Saturday night.
From a point where they looked to be coasting to a comfortable victory after building up a two-goal lead early in the second half, Sligo had to defend frantically as the students piled on the pressure in a nail-biting finish.
On the stroke of half-time, Sligo pounced for the lead goal out of the blue. Mark Hutchison's cross was touched on by Sean Flannery and Neil Ogden applied the perfect finish with a rising shot over the head of Seamus Kelly.
The second half was less than a minute old when Sligo increased their lead when Marcus Hallows scored.
UCD looked down-and-out at that stage, but a well worked goal by Michael O'Byrne in the 56th minute gave them renewed hope.
Sligo were fortunate to escape when Robert Griffin had the ball in the net after 61 minutes only to have the effort ruled out for an infringement on keeper Nicky Broujos.
In the closing stages Broujos made a string of splendid saves, most notably to keep out point blank headers from Griffin and Aidan Lynch.
Sligo Rovers: Broujos, Morgan, Hutchison, O'Grady, Cobesson, Birks, Ogden, Moran, Flannery, Hallows, Rowlands.
UCD: Kelly, Bolger, Fitzgerald, Palmer, McDonnell, Lynch, Kavanagh, J Martin, Griffin, O'Beirne, Kilmurray. Subs: Sherlock for J Martin (31 mins), C Martin for Bolger (80 mins).
Referee: A O'Regan (Cork).