An extraordinary second-half performance from Dundalk saw the Lilywhites retain top spot with an enthralling 5-2 win over Shamrock Rovers in Tallaght.

Rovers led early on through Dan Carr and dominated until Patrick Hoban equalised against the run of play before half time.

Daniel Cleary, Dane Massey and a Robbie Benson brace saw Stephen Kenny's side cut loose in the final stages, with Roberto Lopes briefly giving Rovers some hope.

The Hoops took the lead in just the fourth minute, and most surprising was that it came from an entirely unforced error.

Robbie Benson returned a Dane Massey throw in the corner short and Ronan Finn nipped into cross towards Carr in the centre.

Feeling he had to make an effort to intercept, Brian Gartland diverted the ball towards goal, drawing a wonderful reaction stop from Gary Rogers, but he couldn't prevent Carr slotting in the rebound.

Dundalk looked to hit back immediately and they had half a chance when Dylan Connolly's cross found Hoban, but the striker got slightly under the ball and headed onto the top of the net.

Rovers could have had a penalty when Gartland appeared to catch Aaron Bolger, while Finn curled a free kick narrowly over as the Hoops piled on the pressure.

Carr should have doubled both his and his side's tally after Joel Coustrain hooked the ball onto the six-yard box, but Rogers spread himself well to divert his header away from goal.

Lopes was then fortunate only to see a yellow card when he scythed down Jamie McGrath from behind – the worst excess of a physical opening from both sides.

The loss of Carr to what looked like a muscle strain was the turning point, as his replacement Gary Shaw struggled to impose himself,with Graham Burke also absent with Ireland duty.

That said, the equaliser came somewhat against the run of play, as Rovers switched off after clearing an initial corner and Dundalk extracted the full penalty for their momentary lapse.

A fabulous step and cross from Duffy found Hoban on the edge of the six-yard box and he shrugged off the challenge of Lopes and arced a header skilfully into the corner.

Rovers lost captain Ronan Finn at the break after he shipped a heavy knock in a clash of heads with Brian Gartland, and they never really recovered.

The game exploded into life on the hour mark as a Hoban won a soft free kick on the left, and Cleary lost his marker to nod home Duffy's delivery.

Three minutes later, Massey made it three as he beat Chencinski at his near post – a goal the Canadian won't want to see again.

A Brandon Kavanagh cross that rebounded back off the bar allowed Lopes to pull one back, but straight from kick-off McGrath slipped in Benson to make it 4-2.

Rovers looked to have cut the deficit to one again as Dundalk twice cleared from on or behind their own line, before Kristian Adorjan slipped into Benson to add his second and Dundalk's fifth.

Shamrock Rovers: Tomer Chencinski; Ethan Boyle, Lee Grace, Roberto Lopes, Luke Byrne; Greg Bolger, Aaron Bolger (Brandon Kavanagh 70), Ronan Finn (David McAllister 46); Joel Coustrain, Sean Kavanagh, Dan Carr (Gary Shaw 25).

Dundalk: Gary Rogers; Seán Hoare, Daniel Cleary, Brian Gartland, Dane Massey; Chris Shields, Robbie Benson, Jamie McGrath (Karolis Chvedukas 86); Dylan Connolly (Kristian Adorjan 67), Michael Duffy, Patrick Hoban (Marco Tagbajumi 86).