Celtic were knocked out of Champions League qualifying on Tuesday after a 4-3 defeat to CFR Cluj saw them lose the tie 5-4 on aggregate.
Neil Lennon's side came from behind to force a 1-1 draw in the first leg and were up against it again in Glasgow when Ciprian Deac struck in the first half.
James Forrest, hero of the first leg, levelled the scores before Odsonne Edouard made the most of haphazard defending to make it 2-1 to the Scottish champions.
Abdel Billel Omrani's penalty put Cluj ahead on away goals but Ryan Christie struck just two minutes later to edge Celtic back in front.
There was to be more drama, however, as Omrani turned in a rebound to make it 4-4 on aggregate and give the visitors the edge on away goals.
In the dying seconds, George Tucudean struck a stylish fourth goal to give Cluj the victory and seal a play-off encounter with Slavia Prague.
Deac handed the Romanians the initiative when he headed past Scott Bain 27 minutes in.
Former European Cup winners Celtic hit back six minutes into the second half when Forrest, linked with a move to Russian side Zenit in recent days, fired in an equaliser from inside the box.
Edouard swung the tie Celtic's way 10 minutes later, sweeping the loose ball into the bottom-left corner after Cluj's defence made a mess of trying to clear.
Omrani then snatched a second away goal with a confident penalty, but Christie was on hand to side-foot home almost immediately after the ball broke for Edouard.
However, the twists kept coming, with Omrani sliding in to steer the ball high into the net after Bain had saved from Alexandru Paun.
With Celtic desperately chasing another goal to send them through in the eighth minute of injury time, a hopeful clearance fell kindly to Tucudean, who lofted a composed finish past Bain to send the visiting bench into raptures.