UCD - 2 Drogheda - 1 Robert Griffin scored a crucial winner to lift UCD off the bottom of the table for the first time this season as their revival continued.
Substitute Griffin struck 12 minutes from time to score with a downward header at the back post from Patrick Sullivan's deep cross.
With Derry losing to Cork City at Turner's Cross, this result means UCD go a point above Derry, though the freefalling Foylesiders have a game in hand.
Both sides belied their lowly positions in the table to serve up an intriguing first half, embellished with two excellent goals.
Despite their more positive start, when Declan O'Brien looked set to score when through one-on-one with Patrick Jennings who made a textbook save, Drogheda found themselves behind on 18 minutes.
Robert McAuley resisted launching his usual long throw on the left to, and played a one-two with Alan Cawley to cross. Gavin Whelan timed his run across the edge of the area perfectly to meet the ball and loop a precise header beyond Gary Rogers and into the roof of the net.
Drogheda kept playing and equalised from the first corner of the night on 25 minutes. Tony McDonnell's headed clearance from Gary Cronin's delivery fell kindly for Mark Quinless and the midfielder hit a crisp half-volley from 20 yards that ended up in the back of Jennings' net courtesy of a slight deflection.
A blunder by Rogers four minutes from the break almost gifted the lead back to UCD.
The keeper's sliced clearance scarcely went 20 yards and Rooney was quickly in to cross for McDonnell with Rogers relieved to see the UCD captain's header come back off a post.
As lively as the first, the sides soon swapped chances early in the second half. John Flanagan put O'Brien through on goal within two minutes of the restart, but Jennings was quickly off his line and the striker's flick was wide.
The quick feet of Rooney then set up Robbie Martin at the other end but his shot on the turn was also wide.
UCD: Jennings; Sullivan, McNally, McAuley, Ryan; Whelan (Griffin, 67 mins), McDonnell, Cawley, O'Donnell; R. Martin, Rooney (McWalter, 79 mins).
DROGHEDA UNITED: Rogers; Flanagan, Scully, O'Connor, Gray; Quinless, Molloy, Tierney (Lynch, 88 mins), Cronin; O'Brien (Quinn, 89 mins), Myler.
Referee: E Barr (Dublin).