Celtic have crashed out of the Champions League, after twice letting a lead slip in a dramatic 4-3 home defeat by CFR Cluj on Tuesday.
The Scottish champions made a storming start to the second half to go 2-1 ahead through goals from James Forrest and Odsonne Edouard, but Scott Brown's handball allowed Billel Omrani to net from the spot.
Ryan Christie soon put Celtic back in front, but Omrani quickly levelled again on the rebound in the 80th minute to put the Romanians ahead on away goals in Glasgow.
George Tucudean then netted with the last kick of the game to seal a 5-4 aggregate win in the third qualifying round.
Meanwhile, last season's semi-finalists Ajax came close to crashing out, coming from behind to beat PAOK Thessaloniki 5-4 on aggregate.
Level at 2-2 from the first leg, Ajax faced elimination when their former youth player Diego Biseswar scored for PAOK in the 23rd minute. Ajax captain Dusan Tadic saw one penalty saved, but scored a second to draw level.
A Nicolas Tagliafico header finally put the Dutch team ahead in the 79th, before PAOK's rough, physical style handed Ajax a third penalty converted by Tadic.
Biseswar scored again in stoppage time for PAOK to again put Ajax in danger, but the Dutch champions held on to win.
In the playoff round, the last stage of qualifying, Ajax face a likely easier task against APOEL of Cyprus, who beat Azerbaijan's Qarabag 3-2 on aggregate.
Elsewhere, former group-stage regulars Dynamo Kiev lost in qualifying for the third straight year, losing 4-3 on aggregate to Brugge.
Dinamo Zagreb, LASK Linz, Rosenborg and Olympiacos also went through.