A brace from Brazilian striker Giuliano broke Dundalk hearts in Russia as Zenit St Petersburg qualified from Group D of the Europa League with victory at a snowy Petrovsky Stadium.
The Lilywhites would have been fully aware of Giuliano's predatory instincts - he also hit the winner at Tallaght Stadium - but this was still a bitter pill to swallow after another monumental effort from Stephen Kenny's men.
For the first 20 minutes Dundalk had looked comfortable with Zenit confined to half-chances.
Zenit started slowly, and John Mountney almost grabbed an opener from nowhere after 13 minutes when his cross from the right caught Mikhail Kerzhakov off guard, looping over the keeper and clipping the far post.
Gradually the hosts upped the pace and cracks began to show in the visiting rearguard as the movement and quality before them told.
Oleg Shatov forced Gary Rogers to push the ball over the bar with a powerful drive. However, it was a mistake that led to the deadlock being broken.
Five minutes before half-time, Brian Gartland was caught in possession by Aleksandr Kerzhakov. He tore towards goal, squaring to Giuliano who slid past a helpless Rogers.
Zenit continued to hoard the ball on the turnaround but on 52 minutes, Dundalk were given a huge shot in the arm.
Mauricio tried to nod a header back to his centre-half but he got it wrong and Daryl Horgan - fresh from his call-up to the Republic of Ireland panel - latched on to the loose ball, scurried away from the recovering Zenit defenders and coolly slotted past Mikhail Kerzhakov.
It was another brilliant moment for the Galway man in what's been an incredible year, but his side couldn't hold on.
His equaliser was the cue for incessant Zenit pressure. On the hour, Aleksandr Kerzhakov looked certain to fire home from 12 yards out after a low cross from the left but Gartland snuffed out the danger with a perfectly-timed block.
Mauricio and Axel Witsel both went close as Dundalk clung to the ropes, but with 12 minutes to go, they hit the canvas.
Aleksandr Kerzhakov lofted over a deep cross that dropped to Giuliano. Surrounded by bodies, his initial effort lacked conviction and was bobbling left of the post before Mauricio kept the flame alive by hooking it back towards the Brazilian, and he knocked home his second of the night from five yards out.
Dundalk almost struck back again when a superb pass from Horgan set Patrick McEleney away on the right, and his effort from the edge of the box floated over Mikhail Kerzhakov and bounced off the underside of the crossbar.
Zenit closed it out and sealed progression, but Dundalk will take nothing but positives from another night where they looked right at home against top-class European opposition.
With AZ Alkmaar coming to Tallaght on 24 November for what now looks like a defining showdown, the dream is still alive.
Zenit St Petersburg: Kerzhakov, Anyukov, Novo Neto, Lombaerts (Zhirkovat 89), Criscito, De Paula, Witsel, Da Silveira Júnior, Kokorin, Kerzhakov, Shatov (68)
Dundalk: Rogers, Gannon, Gartland, Boyle, Massey, Shields, Mountney (O'Donnell 45), Finn, McEleney (Shiels 83), Horgan, McMillan (Kilduff 65)
Referee: Luca Banti