Daniel Kelly's goal proved the difference at Oriel Park as Dundalk got the better of St Patrick’s Athletic to move up to second place in the SSE Airtricity League table.

The victory for Stephen O’Donnell over his old club means that the Co Louth side are now the main challengers to table toppers Shamrock Rovers, who they trail by eight points - albeit with a game in hand.

This result also opens up a six-point gap over Pat’s with O’Donnell’s return of 34 points at the break one more than Stephen Kenny had in his first season at Oriel Park back in 2013.

The Lilywhites were the better side throughout, but it was a defensive mistake that allowed Kelly slot home his 24th goal in Dundalk colours on 24 minutes.

Tim Clancy’s side did up the intensity late on but were denied on a number of occasions by Welsh goalkeeper Nathan Shepperd who was also immense when these sides played out a scoreless.

It was the visitors who were first to threaten with Eoin Doyle’s header from a Sam Curtis cross being tipped over the bar by Shepperd inside the opening two minutes. Joe Adams then had the first attempt at goal for Dundalk nine minutes later when he bundled his way past Ian Bermingham, but the Welsh U21 international could only scuff his effort tamely at Joseph Anang.

Tunde Owolabi of St Patrick's Athletic in action against Dundalk's Mark Connolly

Curtis and Doyle would combine again a minute later, but this time the former Bolton Wanderers striker’s header was straight at Shepperd.

The home side then began to take charge of proceedings with Kelly going close on 17 minutes when he met Lewis Macari’s cross acrobatically only to fire over. Adams then had another effort go to the left and wide before the breakthrough arrived on 24 minutes in what was a bit of a horror show at the back for Pat’s.

After Patrick Hoban looked to play Kelly in it looked as though the danger had been snuffed out when Curtis came across the winger, but Bermingham’s decision to step in and try to head back to Anang backfired with Kelly picking up possession to round the goalkeeper and slot home his fifth of the season.

Daniel Kelly celebrates his goal against St Pat's

The home side had a couple of chances to add to their lead after that with Hoban heading just wide after getting on the end of Macari’s cross on 28 minutes before Darragh Leahy dragged a shot wide 12 minutes later.

Pat’s will feel they should have had a penalty two minutes before the break when Leahy’s attempted clearance saw him catch Tunde Owolabi in the box, but despite the Belgian striker’s appeals referee Ray Matthews failed to point to the spot.

Chris Forrester went close five minutes after the restart when he pulled a shot agonisingly wide from just outside the box.

Keith Ward almost conjured up a goal for Dundalk within two minutes of his introduction when he beat Curtis on the left only to see his teasing cross headed into the side-netting by Joe Redmond. Greg Sloggett than had an effort straight at Anang after a lay off by another substitute, Paul Doyle.

Leahy and Robbie Benson then had efforts off target before Billy King stung the palms of Shepperd from a tight angle on 77 minutes with Leahy fortunate that his attempted clearance in the follow up didn’t rebound into his own net before being hooked to safety by Mark Connolly.

Eoin Doyle then let fly from distance on 81 minutes but couldn’t find the target before Shepperd denied his namesake Mark Doyle two minutes later when he clawed away his downward header from the left.

Shepperd then did even better moments later when he touched Darragh Burns’ effort over after his initial shot had been blocked by Andy Boyle.

From the resultant corner he then had to palm Anto Breslin’s effort away before Burns fired the follow up over.

Dundalk: Nathan Shepperd; Lewis Macari, Mark Connolly, Andy Boyle, Darragh Leahy (Sam Bone 89); Greg Sloggett, Robbie Benson (John Martin 79); Steven Bradley (Keith Ward 59), Joe Adams (Paul Doyle 59), Daniel Kelly; Patrick Hoban (David McMillan 79).

St Patrick’s Athletic: Joseph Anang; Tom Grivosti, Joe Redmond, Ian Bermingham (Billy King 57); Sam Curtis, Adam O’Reilly, Chris Forrester, Jason McClelland (Mark Doyle 57), Anto Breslin; Tunde Owolabi (Darragh Burns 57), Eoin Doyle.

Referee: Ray Matthews (Westmeath).