A lightning early strike from Ciaran Behan brought UCD their first win of the season in the clash of the bottom two at the UCD Bowl.
Andy Myler's Students remain at the foot of the table but reduce the gap on ninth-place Cork to four points.
Colin Healy's Rebels may have won the first meeting of the sides when cruising to a 4-0 victory at Turner’s Cross early last month, but they had a rude awakening in the evening sunshine here.
With four changes from their defeat at champions Shamrock Rovers on Monday, UCD started on the front foot and clinically punished sloppy Cork play to take the lead after just 53 seconds for what proved the only goal of the game.
Mark Dignam was the architect, tenaciously winning the ball off a sluggish Joe O’Brien-Whitmarsh before then skilfully skipping past Aaron Bolger.
He then got his head up to lay the ball off to Behan who took a touch before rifling a low left-footed drive past James Corcoran from 22 yards for his second goal of the season.
City laboured into the game and might have been level from their only really incisive attack on 12 minutes.
Swedes Kevin Custovic and Daniel Krezic combined on the left. The latter’s cross into the area found Cian Murphy who turned to set up O’Brien-Whitmarsh whose shot on the turn had neither the power or accuracy to trouble Kian Moore in the College goal.
Cork remained far from sure of themselves at the back and had some frantic defending to do on the double on 20 minutes.
First Donal Higgins’s ball into the area fell to skipper Jack Keaney whose shot was deflected out for a corner.
Cork failed to deal with the subsequent delivery from Higgins, which was recycled by Jesse Dempsey for Behan who scuffed this shot wide.
The visitors might have made more of a set-piece of their own five minutes before the break.
Bolger’s free-kick came back out to Custovic whose fine ball into the area struck Ruairi Keating, who knew little about it, to bounce into the grateful arms of Moore.
But it was UCD, much the better side before the break, who finished the half on the attack with a shout for a penalty in the final minute.
Higgins threaded a ball down the inside-right channel for Dara Keane, who went to ground as he cut past City skipper Cian Coleman. Referee Adrian Reale was unimpressed and gave a free out for a handball.
Cork swapped Tunde Owolabi for Keating up top ahead of the second half to try to inject some urgency to their attack.
Despite enjoying more of the ball, they struggled to create openings as UCD defended doggedly, City failing to register a shot on target in the second half.
UCD then finished the stronger, with Behan shooting against a post out of nothing on 78 minutes, substitute Alex Nolan blazing the rebound over the top.
UCD: Kian Moore; Evan Osam (Luke O’Regan 76), Jack Keaney, Adam Wells (Danny Norris 73), Jess Dempsey; Brendan Barr, Mark Dignam; Ciaran Behan, Dara Keane, Donal Higgins; Jake Doyle (Alex Nolan 69).
Cork City: James Corcoran; Josh Honohan, Jonas Hakkinen, Ally Gilchrist, Kevin Custovic (Barry Coffey 60); Aaron Bolger, Cian Coleman; Cian Murphy, Joe O’Brien-Whitmarsh (Darragh Crowly 83), Daniel Krezic (Ethon Varian 83); Ruairi Keating (Tunde Owolabi h-t).
Referee: Adriano Reale (Kildare).