Mohamed Elyounoussi's last-gasp strike ensured Celtic avoided another European nightmare as they scraped to a 1-0 win over Riga.
The Hoops were looking to recover some continental pride in Latvia following last month's humiliating Champions League exit at the hands of Ferencvaros.
- Europa League play-off draw
- Europa League news | Fixtures | Results
- Two channels for the price of one - 146 live PL games + EFL for just £18 p/m
Yet it was another frustrating night for Neil Lennon as his team again laboured through the motions before edging their way into the Europa League play-offs.
Odsonne Edouard was back on duty after sitting out the weekend win over Livingston but the Frenchman showed little enthusiasm for the task of spearheading Celtic's attack.
And it was the man who replaced him with eight minutes left, Elyounoussi, who grabbed the all-important last-minute goal to seal victory and set up a clash with FK Sarajevo or Buducnost Podgorica next week.
Edouard was supposed to be back refreshed having missed the Livi clash after complaining of tiredness on the back of a hectic schedule for club and county. But he hardly exerted himself during some pretty lethargic opening exchanges at the Skonto Stadium.
The Scottish champions are well used to teams parking the bus, but Riga took it one step further after positioning a pair of double-deckers behind one of the goals so a couple dozen home supporters could cheer on their side.
They were off their seats after 21 minutes as Celtic got themselves so out of shape that the Latvians raced clear on a three-on-one.
Nir Bitton rescued the Hoops with a vital block before Vladimirs Kamess could roll in a team-mate but Lennon could be forgiven for having worrying flashbacks to last month's Champions League catastrophe.
The Parkhead manager had yet more to fret over when James Forrest went down with a calf injury after 32 minutes and had to be replaced by Jeremie Frimpong.
But at least by that stage his side were starting to create. Olivier Ntcham had a 25-yard drive tipped over by Roberts Ozols while a better connection might have seen Bitton net after Shane Duffy climbed high to nod down Christie's up-and-under into the box.
Edouard was then in the action as he slid McGregor in behind the Riga defence but Ritvars Rugins covered up well to deny Frimpong a tap-in at the back post.
The half-time break offered Lennon the opportunity to remind his team they had little margin for error in this one-off tie.
Christie showed some initiative but couldn't follow up his driving run with a finish past Ozols at the near post.
Portuguese ref Fabio Verissimo was feeling lenient as he let Kamess off with a yellow after a shocking rake of the studs down Scott Brown's Achilles.
Albian Ajeti had made a clinical start to his Hoops career with a goal every 40 minutes so far, yet he someone failed to convert from a yard out just moments after replacing Ntcham.
Frimpong fired the ball across goal but the Swiss striker got the ball stuck between his feet and Ozols pounced to smother.
With Edouard hooked, Frimpong was increasingly looking like the man who would make the difference with his surging runs down the left. Armands Petersons cleared another of his wicked low crosses off the line.
But there was no one there to get a block on Elyounoussi in the 90th minute as Frimpong swept another cross into the box for the Norwegian to angle home a precious winner.
Lennon: A dominant performance
Celtic boss Neil Lennon said his team could have been better but did a "very professional" job in Latvia.
He said of his side's performance: "It was dominant. We had to be patient, we left it a little bit late to get the winner. We should have had the game wrapped up a lot earlier, we had a couple of great chances.
"I thought the subs did really well when they came on, but the starting XI I felt played very well. Riga set their stall out early and I just said to them 'you're going to have to keep probing, keep wearing them down, make sure the door is shut at the back'.
"It's not an easy place to come and win, and we've done it very professionally, so I'm delighted. It's not an easy game to play, a lot of pressure on us going into the game, but we've negotiated it very well.
"There was a calmness about us. We didn't get frustrated, we kept going. There was aspects of our play we can do better. But I felt 2-0, 3-0 wouldn't have flattered us. We missed good chances at big moments in the game, but thankfully we've come up with a brilliant goal towards the end.
"That experience I think has stood them in good stead. We've got another real difficult one next week. I felt the performance thoroughly merited the win."
It's a big Scottish Premiership game for Celtic on Sunday as they host third place Hibernian (kick-off 3pm). They will be back in action on Thursday in their Europa League play-off qualifier, visiting Sarajevo.