A dramatic night in Riga ended in jubilant scenes as Sean Hoare's winning spot-kick banked Dundalk €1.2million in prize money and a showdown with Qarabeg in round two of the Champions League.
Hoare, who endured a night to forget in Dundalk's Europa League defeat to Larnaca last summer, left Latvia as the hero, making a stunning block to deny Roman Debelko in extra time before cooly stroking home the 14th penalty of the shootout to send the travelling support crazy.
If Hoare was the standout player in white, he was pushed hard by Gary Rogers. Playing his 41st European game, equalling Ollie Cahill's record, the veteran 'keeper saved two of Riga's penalties, paving the way for Dundalk's win.
Speaking before the game, Lilywhites head coach Vinny Perth said that he expected things to go the distance and he was proven right with 180 minutes of football failing to produce a goal.
The expectation beforehand was that Riga would be happy to sit back and let Dundalk come at them but the hosts opened with a bit of purpose in the opening stages.
After coming on as a sub in the first leg, Andy Boyle started alongside Hoare here he was called upon early on to head a dangerous Joel Bopescu cross to safety after the Frenchman darted in behind Sean Gannon on the right. Rogers then had to come and sweep up after Robbie Benson had his pocket picked by Roger in a central position.
With their passes starting to hit the mark, Dundalk, who had to plan without the absent Michael Duffy, began to find a bit more joy as the half wore on with McEleney becoming increasingly prominent. The Derryman had three sighters at goal in quick succession, the first a well-hit low volley that Robert Ozols did well to push away to safety.
Riga looked limited in attack but Debelko went within a whisker of breaking the deadlock on the stroke of half time. Benson, again, lost possession in a dangerous area but the Ukranian's low effort whistled just wide of Rogers' right-hand post and the sides went in deadlocked at the break again.
Brazilian attacker Felipe Brisola was introduced for Roger with five minutes of the second half gone and Latvian international winger Deniss Rakels joined him two minutes later as the hosts tried to inject some urgency into their play.
Perth also reshuffled his pack by bringing Sean Murray on with 65 minutes played, resulting in Jamie McGrath going wide right. That change came seconds after captain Patrick Hoban had the ball in the Riga net only to see his header correctly ruled out for offside.
Debelko saw a glancing header miss the target shortly after and with both sides lacking a bit of guile in the final third, extra time loomed large as things drifted towards the final quarter of an hour.
The hosts were left aggrieved when Macedonian referee Dimitar Meckarovski waved away their appeals for a penalty with 13 minutes to play after Visnakovs' cross appears to catch the arm of the sliding Patrick McEleney.
The game desperately lacked zip but substitute Daniel Kelly, who was booked for simulation before the end of the 90 minutes, stretched the Riga backline when he came on and he almost scored a sublime solo effort in the 103rd minute after cutting in from the right but his effort went straight at Ozols.
Debelko looked like he was going to win it for the hosts when he latched onto a ball over Boyle's head in the 110th minute. The striker set himself to strike but Hoare came out of nowhere to make an incredible block.
Riga played the final 10 minutes with 10 men after Albanian centre-back Herdi Prenga was sent off for second bookable offence for cynically taking Daniel Kelly out and Dundalk almost snatched a priceless away goal with seven minutes to play when Murray let fly from distance only to see his drive go narrowly wide.
That left a shootout to decide the outcome and after both sides converted with their opening three penalties, nerves started to set in with Dane Massey and Georgie Kelly both seeing efforts saved by Ozols.
Rogers made it advantage Dundalk with a fine stop to deny Peterson and Hoare showed remarkable composure to hit the back of the net and secure Dundalk a crack against the Azerbaijan champions, along with a place in the third qualifying round of the Europa League.
Riga FC: Roberts Ozols; Armands Petersons, Antoijs Cernomordijs Herdi Prenga, Ritvars Rugins; Olegs Laizans (Stefan Panic 81), Tomislav Saric; Aleksejs Visnakovs (Vladislavs Gabovs 105), Roger (Felipe Brisola 51); Joel Bopesu (Deniss Rakels 52); Roman Debelko.
Dundalk FC: Gary Rogers; Sean Gannon, Andy Boyle, Sean Hoare, Dane Massey; Chris Shields (Dean Jarvis 99), Robbie Benson (Daniel Kelly 81); John Mountney (Sean Murray 64), Jamie McGrath, Patrick McEleney (Georgie Kelly 110); Patrick Hoban.
Referee: Dimitar Meckarovski (Macedonia).
We need your consent to load this SoundCloud contentWe use SoundCloud to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences