Dundalk overcame some nervy moments against Bruno's Magpies at Oriel Park to book a Europa Conference League second qualifying round date with KA Akureryi of Iceland next week.
Having drawn 0-0 in Victoria Stadium a week ago, Stephen O’Donnell’s side got off to a dream start when Patrick Hoban headed them in front inside three minutes.
However, a stunning strike from Joe brought Alfonso Cortijo’s side level with the Lilywhites having to soak up further pressure despite substitute John Martin firing them ahead within three minutes of the restart.
The game was finally put to bed seven minutes from time when Andre Dos Santos put through his own net to earn the border side a bumper pay day, with at least €550,000 now guaranteed.
Martin’s introduction proved the difference on the night as he helped sway the tie back in the home side’s favour after the Magpies began to produce the bulk of the chances, just as they had in the first leg.
O’Donnell will be well aware his side will need to up their game, however, if they are to continue their journey past a KA side who were 4-0 aggregate winners over Connah’s Quay Nomads and who recently beat Shamrock Rovers’ conquerors’ Breidablik in the Icelandic Cup semi-final.
The Louth men got off to a dream start when they hit the front with just 130 seconds played as Hoban rose above Ruben Diaz to head Darragh Leahy’s corner to the net.
The home side failed to kick on from that point, however, with the Magpies proving a threat on the break. Their first opening arrived on the quarter hour mark but Dan Bent’s effort was straight at Nathan Shepperd.
Dos Santos then fired wide with an ambitious effort on 18 minutes before Diaz came to his side’s rescue at the other end a minute later when he slid in to deny Daniel Kelly a shot after it looked like he had been slipped in by Hoban.
The visitors would threaten again on 21 minutes following a brilliant break started by Bent, who sent Jamie Coombes clear on the right. His cross picked out the inrushing Joe, whose first-time effort was straight at Shepperd.
That was a warning for what was to come as the Magpies levelled in spectacular fashion on 33 minutes. Coombes’ cross was only partially cleared by the head of Andy Boyle with Joe punishing the home side’s failure to clear their lines as he crashed a stunning effort past Shepperd to the top left hand corner.
Ryan O’Kane did have a chance to restore Dundalk’s lead in first-half stoppage time but his effort was pushed away by Jaylan Hankins after he had cut in from the left onto his right foot.
O’Donnell switched things up at the break by introducing Martin to go to a 4-4-2 formation and the change paid almost instant dividends as he fired the Lilywhites in front on 48 minutes.

The Kilkenny man did well to release O’Kane on the left initially before following up on the winger’s ball into the box. He saw his initial effort saved by Hankins but followed up to slot under the goalkeeper at his near post to make it 2-1 with what was his fifth goal of the campaign.
Olmo Gonzalez had a chance to level 10 minutes later when the ball broke to him at the edge of the box but his strike deflected harmlessly into the arms of Shepperd.
Having weathered plenty of Magpies pressure, Martin had a chance to double his tally when he was picked out in the box by Archie Davies on 78 minutes but got his angles all wrong.
Dundalk could finally breath easy seven minutes from the end when Dos Santos turned the ball into his own net from Hoban’s cross to make it 3-1.
O’Kane did have a late chance to add to his side’s tally but his effort came off Hoban.
It mattered little though as Dundalk advanced with a trip to Iceland now on the cards after their FAI Cup first round tie with Shamrock Rovers on Sunday.
Dundalk: Nathan Shepperd; Archie Davies, Andy Boyle, Louie Annesley, Darragh Leahy; Greg Sloggett, Connor Malley; Daniel Kelly, Johannes Yli-Kokko (John Martin HT), Ryan O’Kane; Patrick Hoban.
Bruno’s Magpies: Jaylan Hankins; Andre Dos Santos, Ruben Diaz, Olmo Gonzalez (Anthony Hernandez 85), Joseph Chipolina (Francisco Zuniga 8); Jamie Coombes (Julian Del Rio 85), Joe, Dan Bent (Carlos Garcia 71), Juan Arguez (Jose Giraldez 71); Jack Storer, Liam Nash.
Referee: Patrik Kolaric (Croatia).