Shamrock Rovers 1 Sligo Rovers 0:Paul Cook, the new Sligo manager, was preparing to celebrate a scarcely deserved point when Ger Rowe's injury-time shot landed high in the visitors' net.
It was just reward for a Rovers side who dominated. But despite that thrilling conclusion, scenes of jubilation were marred at the final whistle when most players from both sides traded punches in an unsightly melee that escalated out of control.
Its origins are unclear although Danny O'Connor from the Dublin side and Sligo's Piotr Bajdziak received red cards.
Despite Chris Turner's early effort from distance, Sligo rarely threatened. They saw little of the ball and breaks upfield were poorly executed, much to the frustration of the visiting support.
Pat Scully's side suppressed their opponents in every department, and while their goal chances were scrappy, they should have led at the break.
Despite finding their space restricted in the second half the locals continued to create opportunities. David Cassidy had perhaps his side's best chance when, having collected a cross from the left with 25 minutes remaining, he shaved the post with a low drive.
Keith Foy went close with a long-range free late on but, whatever about a point, Sligo would not have deserved all three.
Rowe, though, timed his sweet strike to perfection, but recriminations over the dreadful scenes on the whistle will persist.
SHAMROCK ROVERS:Murphy; O'Brien (Clarke, 60 mins), Ferguson, Price, Pender; Duffy (Purcell, 51 mins), Cassidy, Danny O'Connor, David O'Connor; Myler (McGill, 66 mins), Rowe.
SLIGO ROVERS:Arcaba; Coleman (Cretaro, 65 mins), MacKenzie, Vasas, Foy; Manson (McCarthy, 65 mins), Turner, Hughes, Bajdziak; Judge (Aisien, 77 mins), Kudozovic.
Referee: P Tuite (Dublin).