Derry suffered a fourth straight Premier Division defeat after losing out to UCD at the Brandywell.
David McMillan wasted an early UCD chance before Barry McCabe put the students ahead with a fine shot beyond Gerard Doherty and in off a post.
McMillan made it 2-0 a minute after the break by blasting past Doherty.
Kevin Deery pulled one back on 52 minutes with a header from Marc Brolly's corner while Stewart Greacen fired wide in injury time.
McMillan pounced on a poor backpass from Shane McEleney but fired his third-minute shot over with just Doherty to beat.
City responded two minutes later with David McDaid shooting wide from Brolly's cutback.
McEleney cleared off the line from a Hugh Douglas effort before McCabe struck the opener on 37 minutes after beating the Derry offside trap.
McMillan took advantage of poor defend to double the lead although Deery gave the hosts hope with a headed finish.
Michael Duffy and Conor Murphy missed the target as City chased an equaliser while Graecen squandered a good opportunity from Barry McNamee's cross in the fourth minute of added time.
Derry remain in seventh place with the Dublin students four points behind in ninth.
In Friday night's other games leaders Sligo Rovers played out a scoreless draw with Bray Wanderers, Shelbourne beat Dundalk 1-0 and Bohemians drew 1-1 with Cork City.