Goals from Stephen Fox and Eddie Gormley moved Bray Wanderers up to fourth place in the Eircom League Premier Division table.
Following a positive start, Bray deservedly drew first blood on 22 minutes with a superb strike from Fox. Collecting Keith Long's ball, the big midfielder, with his back to goal, turned to shoot home with his left foot for a quality finish.
Having scarcely been in the game, UCD hit back immediately. Their captain, Alan Mahon, broke free down the right to cross for Alan McMally, who was their matchwinner at Shelbourne on Sunday, to beat Alan Young in the Bray goal with a firm header.
Bray were much the better side, however, and Gormley restored their lead on 30 minutes.
Mahon was booked for a foul on Fox and Gormley's free-kick beat Barry Ryan in the UCD goal courtesy of a deflection.
Remarkably, UCD almost equalised again within a minute; Ciarβn Martyn shooting over from Robbie Martin's ball into the Bray area.
UCD pressed hard throughout much of the second half, but were restricted to just two chances on goal. Young frustrated Paul Doolin's young side with good saves from Martyn and Eoin Keating.
UCD: B. Ryan; Delaney, McAuley, McDonnell; Mahon (Keating 33), Timmons, Doolin, McNally, D. Ryan; Martyn, R. Martin (J Martin 75).
BRAY WANDERERS: Young; Long (Britton 83), Charles, Doohan, Farrell; O'Connor, Fox (Keogh 49), Morgan, Gormley; Byrne, Keegan (Williamson 89).
Referee: A. O'Regan (Cork)