Garryowen 12 Terenure College 10
Terenure College gave Garryowen a major fright at Dooradoyle but an injury-time penalty from Gerry Hurley was enough for the defending champions to record their fifth straight AIB League win.
Terenure led 10-6 at half-time and should have been further ahead.
After two Conor Kilroy penalties for the hosts, 'Nure replied with a David McAllister drop goal.
McAllister set up centre Killian Coleman for a 23rd-minute converted try.
But there was heartbreak for the Dubliners after the break when Kilroy (55 minutes) and Hurley (82) kicked Garryowen to victory.
A decision by match referee David Wilkinson aided Garryowen when he over-ruled the touch judges to decree that a penalty by Conor Kilroy was on target. That came after 18 minutes and it gave the home side a 6-0 lead.
Within a minute of Kilroy's second penalty, the outstanding David McAllister, a former Leinster squad member, dropped a goal to bring Terenure back into the game and for the remainder of the half the visitors were well on top.
They were full value for their 23rd-minute try which saw Coleman race in close to the posts after a good build-up in which McAllister played a key role. He also converted the try to leave his side 10-6 ahead at the turnaround.
But by that stage Terenure should have been well clear. Brian Flanagan was almost in for a try after 30 minutes when the best player on view, flanker Peter O'Malley, sent him clear only for Ireland 'A' international Keith Earls to get across and bring off a tackle two metres out.
For a four-minute spell following that attack, Terenure were camped on the Garryowen try-line but only some outstanding defence kept them out.
Kilroy narrowed the gap with a 55th-minute penalty as Garryowen soaked up pressure from a lively and better ball-playing Terenure.
McAllister had a chance to put Terenure further in front, early in the second half, but he was unable to judge the swirling wind and his effort from 35 metres went inches wide. That proved crucial during a second half which ended in heartbreaking fashion for the Dubliners.
Terenure had reason to believe they would survive when Kilroy missed a penalty for the home side after 69 minutes. And 'Nure had another major scare with only two minutes remaining when they were penalised for hands in the ruck.
Garryowen decided to change place-kicker but number 9 Hurley failed from what seemed an easy enough position.
From the drop-out, Alan Kingsley was well wide with a long range drop kick attempt as the panic-stricken Garryowen side stared at defeat.
However, Terenure were punished again for their lack of discipline and this time Hurley stole the points with the second last kick of the game.
Scorers:
Garryowen: Pens: Conor Kilroy 3, Gerry Hurley
Terenure College: Try: Killian Coleman; Con: David McAllister; Drop: David McAllister
HT: Garryowen 6 Terenure College 10