Jack Byrne scored twice as Shamrock Rovers eventually overcome a spirited UCD side at Tallaght Stadium.
Aaron McEneff added the clincher in injury time after Yoyo Mahdy had levelled up for the Students before the break.
It was Byrne – whose performance here two weeks ago in front of Mick McCarthy earned him an international call-up – who stole the show with a well-taken double.
Rovers had already seen two efforts ripple the top of the UCD net through Byrne and Dylan Watts when Aaron Greene squandered a gilt-edged chance to put the home side in front.
The recent Ireland call-up Byrne played a perfect through-ball for the striker to race onto, but with only Conor Kearns to beat, he shot meekly at the keeper.
The Hoops did take the lead within 20 minutes and it was the man of the moment who provided it after Greg Bolger intercepted a poor pass from Mahdy in the UCD half.
He played the ball wide to Ronan Finn and he picked out Byrne inside. His shot into the corner was well-placed but Kearns seemed to have it covered, but the ball squirmed through his grasp and in.
A sliced clearance from Kearns should have led to number two as Watts cushioned the ball in for Aaron McEneff but, after spinning the defender, he again shot tamely at the keeper.
Kearns went from villain to hero as he stopped a certain goal from Byrne on the half-hour, clawing the playmaker’s goalbound shot out of the top corner.
UCD levelled seven minutes from time following a brilliantly run from Neil Farrugia, who assisted here for Ireland Under-21s on Sunday and laid another on a plate for Mahdy this evening.
Rovers should have gone back in front before the break as Sean Kavanagh teed up Greene for a tap-in, but he missed the ball, and moments later Finn missed poorly with his head from close range.
Both sides had chances after the break, Jason McClelland seeing a shot blocked for UCD before Green, who missed a hat-trick of sitters, couldn’t force the ball home from close range.
Rovers’ pressure eventually told, however, and Byrne doubled his tally when Finn’s cross was deflected into his path and he drove the ball low through a mass of bodies.
McEneff made sure of the win in injury time as UCD gambled and Kearns was caught up the pitch from a corner and the Derryman walked the ball home.
Shamrock Rovers 3-1 UCD. Rovers maintain their seven point lead at the top of the table, but they had to dig deep to see off a stubborn UCD side at Tallaght Stadium. #rtesoccer pic.twitter.com/Cq0sziBy3V— Soccer Republic (@SoccRepublic) March 29, 2019
Shamrock Rovers: Mannus; Bone, Lopes, Grace, Kavanagh; Bolger, McEneff, Finn; Byrne, Watts (Coustrain 59), Greene.
UCD: Kearns; Tobin, Scales, Collins, Dignam; O’Neill, O’Farrell, Molloy; McClelland, Farrugia, Mahdy.
Referee: John McLoughlin.