Sean Gannon scored a scrappy, late, late winner to deprive Longford Town of a creditable draw at Tallaght Stadium.
A below par performance it may have been from the champions, it nonetheless put Stephen Bradley's Shamrock Rovers top of the SSE Airtricity League Premier Division table for the first time this season, albeit on goal scored in a three-way tie ahead of St Patrick’s Athletic and sign Rovers.
With the sides having swapped penalties early in each half, Rovers' late pressure told three minutes into added time.
Dylan Watts’s free kick was half cleared to Gannon whose drive deflected to the net off Longford captain Aodh Dervin.
The result was tough on Longford, if the performance was encouraging following last week’s 4-0 home humbling by Drogheda United.
Both sides rang the changes from their most recent outings with Rovers making five to the side that won at Derry City on Tuesday while Longford manager Daire Doyle made four switches.
Aaron Dobbs was one of those Town changes from the starting eleven last week and the striker tormented his former club early on, winning a seventh minute penalty to give the visitors a very encouraging start.
Roberto Lopes dallied on a pass back from Graham Burke with Dobbs alert to his sloppiness to pounce and get goal side of him. In trying to retrieve the situation, the back-tracking Cape Verde international pushed Dobbs off the ball to concede a penalty.
Lopes was booked, though Longford felt he should have been sent off, before Dylan Grimes confidently sent Alan Mannus the wrong way from 12 yards.
Looking for an immediate response, Rovers probed with Graham Burke unleashing a couple of drives from distance, one cannoning out for a corner off the head of Joe Gorman, the other straight into the grateful arms of keeper Michael Kelly.
Four corners in relatively quick succession came to nothing either for the sluggish Hoops as Longford's work-rate was impressive.
And as Rovers struggled to find any end product to their dominance of possession, it was Longford who came close to doubling their lead on 37 minutes.
Shane Elworthy did well on the right to deliver the ball into the Rovers area. Grimes laid it into the path of Aaron Robinson whose shot was deflected out for Town’s first corner of the game.
Hoops did muster an effort on goal in first half added time; Aaron Greene’s header from Burke’s right flank cross was directly into the arms of Kelly.
Rovers brought in Gary O’Neill and Rory Gaffney at half-time for Lee Grace and skipper Ronan Finn and it almost had an instant effect as they worked Kelly twice inside a minute.
Chris McCann initially forced a corner from the diving Kelly before the Town keeper was there again to save a Burke header at the near post from Danny Mandroiu’s corner.
The pressure of Rovers’ eighth corner finally told on 54 minutes, though. Remarkably, it was a reverse of the game’s first penalty incident as Dobbs hauled down Lopes as he darted across the area to meet Burke’s quickly taken corner.
Burked drilled the resulting spot kick down the middle to level the game.
Longford relieved the siege on their goal to enjoy a spell down the other end as Robinson forced a tip over save from Mannus before Karl Chambers saw his lob land on the roof of the net.
Rovers laboured to create much as they pressed for a winner.
Gaffney shot narrowly wide while Burke volleyed over the crossbar before Gannon's last gasp intervention delivered the points at the death to break Longford hearts.
Shamrock Rovers: Alan Mannus; Lee Grace (Gary O’Neill h-t), Roberto Lopes, Liam Scales; Ronan Finn (Ronan Finn h-t), Chris McCann; Sean Gannon, Danny Mandroiu (Dylan Watts 58), Sean Kavanagh; Graham Burke, Aaron Greene.
Longford Town: Michael Kelly; Karl Chambers, Aaron O’Driscoll, Joe Gorman, Paddy Kirk; Aaron Bolger (Sam Verdon 72), Aodh Dervin; Shane Elworthy, Aaron Robinson, Dylan Grimes; Aaron Dobbs (Rob Manley 80).
Referee: Rob Hennessy (Dublin).