Finn Harps maintained their challenge for third spot in the league on Saturday night thanks to a late goal from substitute Paddy McGrenaghan.
The students, who had held Harps to a scoreless draw on their last visit to Ballybofey, seemed to be heading for a repeat performance until McGrenaghan won the ball on the edge of the box in the 89th minute. The Harps midfielder beat two defenders and then slotted the ball under Barry Ryan's legs for the only score of the game.
Before that things had been pretty even, although Harps did have the best of the chances in the first half. James Mulligan had a header flash past the post in the fourth minute and three minutes later Pascal Vaudequin rattled the foot of the post with a left-foot drive.
A torrential rainstorm just before the break made conditions extremely difficult for both teams in the second half.
FINN HARPS: McKenna, Vaudequin, Minnock, Boyle, Dykes, O'Brien, Mohan, Kavanagh (McHugh 82), Speak (Bradley 82), Mulligan, Harkin (McGrenaghan 55)
UCD: Ryan, Brett, Mahon, Lynch, Delaney, Martin, Kavanagh, McLoughlin, O'Byrne, Fitzpatrick (Bennis 67), Dunne.
Referee: H Byrne (Dublin).