Marius Niculae scored twice as 10-man Dinamo Bucharest kept alive their hopes of advancing to the last 32 of the Europa League by beating Group F's bottom team Sturm Graz 2-1.
Dinamo goalkeeper Emilian Dolha saved a fourth-minute penalty from Samir Muratovic but could not prevent Mario Sonnleitner from giving the already-eliminated visitors the lead 60 seconds later.
However, Niculae equalised in the 41st minute and bagged the winner in the 57th, and the hosts held on despite the 43rd-minute dismissal of Laurentiu Rus.
Dinamo came into the game needing to win and hoping Panathinaikos lost at Galatasaray - and got both, meaning second place in the pool will be decided when Dinamo visit Pana in the final round of matches in a fortnight.
The Romanian side, who had played their first two home group games behind closed doors, could have been a goal down after the first real attack.
Rus handled the ball after just three minutes and Muratovic stepped up to the spot for the visitors, but home goalkeeper Dolha guessed correctly to stop Muratovic's low left-footed effort.
But the Austrians did grab the lead just a minute later. A corner from the left found Sonnleitner, who headed into the far corner from nine yards.
The Romanians began mounting some pressure but Sturm goalkeeper Christian Gratzei made a fine save from Andrei Cristea's low shot after a counter-attack on the half-hour.
Sturm passed up the chance to double their lead 10 minutes later when Gordon Schildenfeld's header from a free-kick flew just over the bar.
And Dinamo made the visitors pay for their profligacy by equalising a minute later. Gratzei blocked Cristea's shot but the ball fell for Niculae, whose effort deflected in off Gratzei for the equaliser.
The hosts were reduced to 10 men two minutes before the interval with Rus picking up a second yellow card.
Niculae was just inches away from giving Dinamo the lead two minutes after the restart but fired wide from 17 yards.
But the Romania international did double his tally 10 minutes later. Gabriel Bostina's free-kick from the right side sailed to the far post, where Niculae was quicker than Sonnleitner and headed past Gratzei from six yards.
Dolha produced a fine save from Jakub Jantscher's fierce low blast just after the hour to keep his side ahead, as the home team worked hard to keep the Austrians at bay.