Cork City won their first FAI Cup since 2007 as a last-gasp extra-time winner by former Dundalk player Sean Maguire denied the Lilywhites an historic double-double feat.

As penalties loomed deep into extra-time, the Kilkenny native turned on Stephen Beattie's long throw inside the box and found the far corner with the aid of a slight deflection off Gartland.

"In a scrappy game, it was going to take a scrappy goal like that to win it," said the match-winner afterwards.

"I'm absolutely buzzing but for the manager, players and fans, we deserve to win this trophy.

"Dundalk are a tremendous team and had us on the ropes of a while but we dug deep to nick it."

A dull first half had fashioned just one real opportunity of note, when the trailblazer of the season, Daryl Horgan, released David McMillan through the middle four minutes from half-time.

Although the striker got a clean connection on his shot, goalkeeper Mark McNulty read the effort from point-blank range to perfection and batted it away.

Having sat deep in the opening half, Cork added some invention after the turnaround and might have nudged ahead on the hour when Alan Bennett sent his header from a corner towards goal only for Sean Gannon to clear off the line.

The Lilywhites fashioned a glorious opening to nick it in the final minute as substitute Ciaran Kilduff rose to meet Daryl Horgan's left-wing cross but the tall striker couldn't keep his header down.

The holders continued to press in extra-time, McNulty needing to be at his best to turn Horgan's cross-shot away for a corner. And Finn might have pinched the winner when he drilled wide from the edge of the box.

Unlike that miss, Maguire was lethal in extra-time. It was enough to bring a proud Leesider, Roy Keane, to his feet in the stand.